PERFORCE change 46314 for review
Sam Leffler
sam at FreeBSD.org
Sun Feb 1 10:34:49 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=46314
Change 46314 by sam at sam_ebb on 2004/02/01 10:33:57
o don't reuse ni when doing ap bridge forwarding; besides being
bad programming practice it's now used later and so this caused
a null reference
o remove some bogus node_unref calls on error conditions--the caller
holds the node ref and is responsible for doing the unref
Affected files ...
.. //depot/projects/netperf+sockets/sys/net80211/ieee80211_input.c#13 edit
Differences ...
==== //depot/projects/netperf+sockets/sys/net80211/ieee80211_input.c#13 (text+ko) ====
@@ -121,7 +121,6 @@
IEEE80211_DPRINTF(ic, IEEE80211_MSG_ANY,
("receive packet with wrong version: %x\n",
wh->i_fc[0]));
- ieee80211_unref_node(&ni);
ic->ic_stats.is_rx_badversion++;
goto err;
}
@@ -291,7 +290,6 @@
IEEE80211_SEND_MGMT(ic, ni,
IEEE80211_FC0_SUBTYPE_DISASSOC,
IEEE80211_REASON_NOT_ASSOCED);
- ieee80211_unref_node(&ni);
ic->ic_stats.is_rx_notassoc++;
goto err;
}
@@ -305,7 +303,6 @@
IEEE80211_DPRINTF(ic, IEEE80211_MSG_INPUT,
("%s: data from unauthenticated src %s\n",
__func__, ether_sprintf(wh->i_addr2)));
- ieee80211_unref_node(&ni);
ic->ic_stats.is_rx_not1xauth++;
/* XXX node statistic */
goto err;
@@ -364,13 +361,14 @@
else
m1->m_flags |= M_MCAST;
} else {
- ni = ieee80211_find_node(ic, eh->ether_dhost);
- if (ni != NULL) {
- if (ni->ni_associd != 0) {
+ struct ieee80211_node *ni1 =
+ ieee80211_find_node(ic, eh->ether_dhost);
+ if (ni1 != NULL) {
+ if (ni1->ni_associd != 0) {
m1 = m;
m = NULL;
}
- ieee80211_unref_node(&ni);
+ ieee80211_unref_node(&ni1);
}
}
if (m1 != NULL) {
More information about the p4-projects
mailing list