diff options
author | ume <ume@FreeBSD.org> | 2000-12-11 18:53:40 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2000-12-11 18:53:40 +0000 |
commit | 4db8a5921bdb7defa64878a21d24da42372d2aa0 (patch) | |
tree | a68b7a2f014dc5db1cdf8e6cff691d7ef01dd813 /sys | |
parent | 89e57811313c801ee801f009580d9a4beeb7c656 (diff) | |
download | FreeBSD-src-4db8a5921bdb7defa64878a21d24da42372d2aa0.zip FreeBSD-src-4db8a5921bdb7defa64878a21d24da42372d2aa0.tar.gz |
fix problem with vmware DAD. reported by many, tested @ IETF49 with
help from Florent Parent <Florent.Parent@viagenie.qc.ca>.
Obtained from: KAME
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/lnc/if_lnc.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c index f56a56d..1d77356 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; |