summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_output.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-09-01 02:55:09 +0000
committersam <sam@FreeBSD.org>2003-09-01 02:55:09 +0000
commit0ff5af9151714f9f59c716b8ae6071de4c604cfc (patch)
treec49aa7a55e85e6f1c43e7ee1f8a29b1e9727a7bf /sys/net80211/ieee80211_output.c
parent5e6a3dfd3f295a2bbe48d1d65ddd2040fe0dfbb9 (diff)
downloadFreeBSD-src-0ff5af9151714f9f59c716b8ae6071de4c604cfc.zip
FreeBSD-src-0ff5af9151714f9f59c716b8ae6071de4c604cfc.tar.gz
o correct logic that checks frame size to decide if a cluaster is needed
o add an assertion to check the max possible packet size Noticed by: David Young <dyoung@pobox.com>
Diffstat (limited to 'sys/net80211/ieee80211_output.c')
-rw-r--r--sys/net80211/ieee80211_output.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index 1fa87f2..ccf09b3 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -284,7 +284,8 @@ ieee80211_getmbuf(int flags, int type, u_int pktlen)
{
struct mbuf *m;
- if (pktlen > MHLEN)
+ KASSERT(pktlen <= MCLBYTES, ("802.11 packet too large: %u", pktlen));
+ if (pktlen <= MHLEN)
MGETHDR(m, flags, type);
else
m = m_getcl(flags, type, M_PKTHDR);
OpenPOWER on IntegriCloud