diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2009-07-20 19:12:08 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2009-07-20 19:12:08 +0000 |
commit | 0dabd4da957e96805f21216cc44bc94439647949 (patch) | |
tree | a3c1502dbf378e42dd0c635145f69ddd644fcb2b /sys/net80211/ieee80211_input.c | |
parent | d32e9e9901044568408ca4ef06315cfca9176870 (diff) | |
download | FreeBSD-src-0dabd4da957e96805f21216cc44bc94439647949.zip FreeBSD-src-0dabd4da957e96805f21216cc44bc94439647949.tar.gz |
More mesh bits, namely:
* bridge support (sam)
* handling of errors (sam)
* deletion of inactive routing entries
* more debug msgs (sam)
* fixed some inconsistencies with the spec.
* decap is now specific to mesh (sam)
* print mesh seq. no. on ifconfig list mesh
* small perf. improvements
Reviewed by: sam
Approved by: re (kib)
Diffstat (limited to 'sys/net80211/ieee80211_input.c')
-rw-r--r-- | sys/net80211/ieee80211_input.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index b2b6368..3c87a3a 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -233,22 +233,17 @@ ieee80211_deliver_data(struct ieee80211vap *vap, struct mbuf * ieee80211_decap(struct ieee80211vap *vap, struct mbuf *m, int hdrlen) { -#ifdef IEEE80211_SUPPORT_MESH - union { - struct ieee80211_qosframe_addr4 wh4; - uint8_t b[sizeof(struct ieee80211_qosframe_addr4) + - sizeof(struct ieee80211_meshcntl_ae11)]; - } whu; -#define wh whu.wh4 -#else struct ieee80211_qosframe_addr4 wh; -#endif struct ether_header *eh; struct llc *llc; + KASSERT(hdrlen <= sizeof(wh), + ("hdrlen %d > max %zd", hdrlen, sizeof(wh))); + if (m->m_len < hdrlen + sizeof(*llc) && (m = m_pullup(m, hdrlen + sizeof(*llc))) == NULL) { - /* XXX stat, msg */ + vap->iv_stats.is_rx_tooshort++; + /* XXX msg */ return NULL; } memcpy(&wh, mtod(m, caddr_t), hdrlen); @@ -295,7 +290,6 @@ ieee80211_decap(struct ieee80211vap *vap, struct mbuf *m, int hdrlen) eh->ether_type = htons(m->m_pkthdr.len - sizeof(*eh)); } return m; -#undef wh } /* |