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>
This commit is contained in:
sam 2003-09-01 02:55:09 +00:00
parent 5e6a3dfd3f
commit 0ff5af9151

View File

@ -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);