diff options
author | sam <sam@FreeBSD.org> | 2008-08-02 18:02:57 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-08-02 18:02:57 +0000 |
commit | 23d20752467b10db5258c0c0d773f9ccc7d615fe (patch) | |
tree | 7f7248b4c2fa99a0c312bad1ce1eacd618ec05ef /sys/net80211/ieee80211_input.c | |
parent | e93a37806ca2cec56ae87131474e1e3df5aec832 (diff) | |
download | FreeBSD-src-23d20752467b10db5258c0c0d773f9ccc7d615fe.zip FreeBSD-src-23d20752467b10db5258c0c0d773f9ccc7d615fe.tar.gz |
correct decap of of AppleTalk and IPX frames; don't strip the SNAP
header as they have one natively
Submitted by: Chris Zimmermann
Diffstat (limited to 'sys/net80211/ieee80211_input.c')
-rw-r--r-- | sys/net80211/ieee80211_input.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 9ae653f..67bcd43 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -239,7 +239,10 @@ ieee80211_decap(struct ieee80211vap *vap, struct mbuf *m, int hdrlen) llc = (struct llc *)(mtod(m, caddr_t) + hdrlen); if (llc->llc_dsap == LLC_SNAP_LSAP && llc->llc_ssap == LLC_SNAP_LSAP && llc->llc_control == LLC_UI && llc->llc_snap.org_code[0] == 0 && - llc->llc_snap.org_code[1] == 0 && llc->llc_snap.org_code[2] == 0) { + llc->llc_snap.org_code[1] == 0 && llc->llc_snap.org_code[2] == 0 && + /* NB: preserve AppleTalk frames that have a native SNAP hdr */ + !(llc->llc_snap.ether_type == htons(ETHERTYPE_AARP) || + llc->llc_snap.ether_type == htons(ETHERTYPE_IPX))) { m_adj(m, hdrlen + sizeof(struct llc) - sizeof(*eh)); llc = NULL; } else { |