summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-05-22 13:32:24 +0000
committerdg <dg@FreeBSD.org>1995-05-22 13:32:24 +0000
commitcf998003ee86fb7b707872c6e8b3f7c74568ff0e (patch)
treebb20f87bfc752329a27d5739a0e1a7bef177651f /sys/pci
parent4c238c72a8d8fa175abe4d6d7acc730f42d65846 (diff)
downloadFreeBSD-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/pci')
-rw-r--r--sys/pci/if_de.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c
index b2d72c1..8b708f0 100644
--- a/sys/pci/if_de.c
+++ b/sys/pci/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)))
OpenPOWER on IntegriCloud