1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-22 15:47:37 +00:00

There are two serious bugs in if_de.c. The first should not matter

to most users (the wrong length is passed to ether_input).  The
second is more serious.  The multicast hash algorithm uses the wrong
(low) bits instead of the right (high) bits.  This is only an issue
if you use >12 multicast addresses but if you are using IP multicast
then it might affect you...

Submitted by:	Matt Thomas
This commit is contained in:
David Greenman 1995-05-22 13:32:24 +00:00
parent 751b0b8e10
commit 87c15d9649
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8699
2 changed files with 8 additions and 6 deletions

View File

@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: if_de.c,v 1.24 1995/05/05 20:09:51 davidg Exp $
* $Id: if_de.c,v 1.25 1995/05/22 05:51:41 davidg Exp $
*
*/
@ -674,7 +674,8 @@ tulip_rx_intr(
if (m0 != NULL) {
m->m_pkthdr.rcvif = ifp;
m->m_data += sizeof(struct ether_header);
m->m_len = m->m_pkthdr.len = total_len;
m->m_len = m->m_pkthdr.len = total_len -
sizeof(struct ether_header);
#if defined(__bsdi__)
eh.ether_type = ntohs(eh.ether_type);
#endif
@ -1042,7 +1043,7 @@ tulip_read_srom(
}
}
#define tulip_mchash(mca) (tulip_crc32(mca, 6) & 0x1FF)
#define tulip_mchash(mca) ((tulip_crc32(mca, 6) >> 23) & 0x1FF)
#define tulip_srom_crcok(databuf) ( \
(tulip_crc32(databuf, 126) & 0xFFFF) == \
((databuf)[126] | ((databuf)[127] << 8)))

View File

@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: if_de.c,v 1.24 1995/05/05 20:09:51 davidg Exp $
* $Id: if_de.c,v 1.25 1995/05/22 05:51:41 davidg Exp $
*
*/
@ -674,7 +674,8 @@ tulip_rx_intr(
if (m0 != NULL) {
m->m_pkthdr.rcvif = ifp;
m->m_data += sizeof(struct ether_header);
m->m_len = m->m_pkthdr.len = total_len;
m->m_len = m->m_pkthdr.len = total_len -
sizeof(struct ether_header);
#if defined(__bsdi__)
eh.ether_type = ntohs(eh.ether_type);
#endif
@ -1042,7 +1043,7 @@ tulip_read_srom(
}
}
#define tulip_mchash(mca) (tulip_crc32(mca, 6) & 0x1FF)
#define tulip_mchash(mca) ((tulip_crc32(mca, 6) >> 23) & 0x1FF)
#define tulip_srom_crcok(databuf) ( \
(tulip_crc32(databuf, 126) & 0xFFFF) == \
((databuf)[126] | ((databuf)[127] << 8)))