diff options
author | sam <sam@FreeBSD.org> | 2003-09-01 02:55:09 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2003-09-01 02:55:09 +0000 |
commit | 0ff5af9151714f9f59c716b8ae6071de4c604cfc (patch) | |
tree | c49aa7a55e85e6f1c43e7ee1f8a29b1e9727a7bf | |
parent | 5e6a3dfd3f295a2bbe48d1d65ddd2040fe0dfbb9 (diff) | |
download | FreeBSD-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>
-rw-r--r-- | sys/net80211/ieee80211_output.c | 3 |
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); |