1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

correct termination check doing amsdu de-aggregation

MFC after:	3 days
This commit is contained in:
Sam Leffler 2007-11-08 17:11:40 +00:00
parent db27a9dac7
commit 0c99c16b0f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=173462

View File

@ -205,7 +205,7 @@ struct mbuf *
ieee80211_decap_amsdu(struct ieee80211_node *ni, struct mbuf *m)
{
struct ieee80211com *ic = ni->ni_ic;
int totallen, framelen;
int framelen;
struct mbuf *n;
/* discard 802.3 header inserted by ieee80211_decap */
@ -213,7 +213,6 @@ ieee80211_decap_amsdu(struct ieee80211_node *ni, struct mbuf *m)
ic->ic_stats.is_amsdu_decap++;
totallen = m->m_pkthdr.len;
for (;;) {
/*
* Decap the first frame, bust it apart from the
@ -224,11 +223,11 @@ ieee80211_decap_amsdu(struct ieee80211_node *ni, struct mbuf *m)
m = ieee80211_decap1(m, &framelen);
if (m == NULL) {
IEEE80211_DISCARD_MAC(ic, IEEE80211_MSG_ANY,
ni->ni_macaddr, "a-msdu", "%s", "first decap failed");
ni->ni_macaddr, "a-msdu", "%s", "decap failed");
ic->ic_stats.is_amsdu_tooshort++;
return NULL;
}
if (framelen == totallen)
if (m->m_pkthdr.len == framelen)
break;
n = m_split(m, framelen, M_NOWAIT);
if (n == NULL) {