Module Name: src
Committed By: ozaki-r
Date: Tue Dec 6 08:21:47 UTC 2016
Modified Files:
src/sys/dev/ic: lemac.c
Log Message:
Don't check if the frame is for us in the driver
It's done normally by ether_input now. And also if drop packets here,
bridge(4) doesn't work with the driver.
To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/ic/lemac.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/lemac.c
diff -u src/sys/dev/ic/lemac.c:1.45 src/sys/dev/ic/lemac.c:1.46
--- src/sys/dev/ic/lemac.c:1.45 Fri Jun 10 13:27:13 2016
+++ src/sys/dev/ic/lemac.c Tue Dec 6 08:21:47 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: lemac.c,v 1.45 2016/06/10 13:27:13 ozaki-r Exp $ */
+/* $NetBSD: lemac.c,v 1.46 2016/12/06 08:21:47 ozaki-r Exp $ */
/*-
* Copyright (c) 1994, 1995, 1997 Matt Thomas <[email protected]>
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lemac.c,v 1.45 2016/06/10 13:27:13 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lemac.c,v 1.46 2016/12/06 08:21:47 ozaki-r Exp $");
#include "opt_inet.h"
@@ -302,21 +302,11 @@ lemac_input(
if (length & 1)
m->m_data[length - 1] = LEMAC_GET8(sc, offset + length - 1);
}
- if (sc->sc_if.if_bpf != NULL) {
- m->m_pkthdr.len = m->m_len = length;
- bpf_mtap(&sc->sc_if, m);
- }
- /*
- * If this is single cast but not to us
- * drop it!
- */
- if ((eh.ether_dhost[0] & 1) == 0
- && !LEMAC_ADDREQUAL(eh.ether_dhost, sc->sc_enaddr)) {
- m_freem(m);
- return;
- }
+
m->m_pkthdr.len = m->m_len = length;
m_set_rcvif(m, &sc->sc_if);
+ bpf_mtap(&sc->sc_if, m);
+
if_percpuq_enqueue((&sc->sc_if)->if_percpuq, m);
}