summaryrefslogtreecommitdiff
path: root/sys/dev/lnc
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2000-12-11 18:53:40 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2000-12-11 18:53:40 +0000
commit39715b6a8a628976d263b1ff1344508c0f55633f (patch)
tree807e2290e6e17d4b81ad0a0c6213c9d634d668c2 /sys/dev/lnc
parent773c6e3ca0758b7a4b43f80d52663ef8dbdd7ac2 (diff)
Notes
Diffstat (limited to 'sys/dev/lnc')
-rw-r--r--sys/dev/lnc/if_lnc.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c
index f56a56d7f104..1d77356c1575 100644
--- a/sys/dev/lnc/if_lnc.c
+++ b/sys/dev/lnc/if_lnc.c
@@ -548,12 +548,22 @@ lnc_rint(lnc_softc_t *sc)
head->m_pkthdr.len = pkt_len ;
eh = (struct ether_header *) head->m_data;
- /* Skip over the ether header */
- head->m_data += sizeof *eh;
- head->m_len -= sizeof *eh;
- head->m_pkthdr.len -= sizeof *eh;
+ /*
+ * vmware ethernet hardware emulation loops
+ * packets back to itself, violates IFF_SIMPLEX.
+ * drop it if it is from myself.
+ */
+ if (bcmp(eh->ether_shost,
+ sc->arpcom.ac_enaddr, ETHER_ADDR_LEN) == 0) {
+ m_freem(head);
+ } else {
+ /* Skip over the ether header */
+ head->m_data += sizeof *eh;
+ head->m_len -= sizeof *eh;
+ head->m_pkthdr.len -= sizeof *eh;
- ether_input(&sc->arpcom.ac_if, eh, head);
+ ether_input(&sc->arpcom.ac_if, eh, head);
+ }
} else {
int unit = sc->arpcom.ac_if.if_unit;