diff options
author | dg <dg@FreeBSD.org> | 1995-05-22 13:32:24 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-05-22 13:32:24 +0000 |
commit | cf998003ee86fb7b707872c6e8b3f7c74568ff0e (patch) | |
tree | bb20f87bfc752329a27d5739a0e1a7bef177651f /sys/dev/de | |
parent | 4c238c72a8d8fa175abe4d6d7acc730f42d65846 (diff) | |
download | FreeBSD-src-cf998003ee86fb7b707872c6e8b3f7c74568ff0e.zip FreeBSD-src-cf998003ee86fb7b707872c6e8b3f7c74568ff0e.tar.gz |
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
Diffstat (limited to 'sys/dev/de')
-rw-r--r-- | sys/dev/de/if_de.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c index b2d72c1..8b708f0 100644 --- a/sys/dev/de/if_de.c +++ b/sys/dev/de/if_de.c @@ -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))) |