1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-28 16:43:09 +00:00

reclaim node reference when ieee80211_encap fails

Reviewed by:	avatar
Approved by:	re (scottl)
This commit is contained in:
Sam Leffler 2005-07-08 16:31:19 +00:00
parent 025afcf2d5
commit 0a5ae7ccb8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147834
3 changed files with 13 additions and 4 deletions

View File

@ -1489,8 +1489,10 @@ iwi_start(struct ifnet *ifp)
BPF_MTAP(ifp, m0);
m0 = ieee80211_encap(ic, m0, ni);
if (m0 == NULL)
if (m0 == NULL) {
ieee80211_free_node(ni);
continue;
}
if (ic->ic_rawbpf != NULL)
bpf_mtap(ic->ic_rawbpf, m0);

View File

@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$");
#include <dev/ral/if_ralreg.h>
#include <dev/ral/if_ralvar.h>
#define RAL_DEBUG
#ifdef RAL_DEBUG
#define DPRINTF(x) do { if (ral_debug > 0) printf x; } while (0)
#define DPRINTFN(n, x) do { if (ral_debug >= (n)) printf x; } while (0)
@ -1016,8 +1017,10 @@ ral_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
case IEEE80211_S_RUN:
ral_set_chan(sc, ic->ic_bss->ni_chan);
if (ic->ic_opmode != IEEE80211_M_MONITOR)
if (ic->ic_opmode != IEEE80211_M_MONITOR) {
ral_set_bssid(sc, ic->ic_bss->ni_bssid);
ral_update_slot(ic->ic_ifp);
}
if (ic->ic_opmode == IEEE80211_M_HOSTAP ||
ic->ic_opmode == IEEE80211_M_IBSS) {
@ -2108,8 +2111,10 @@ ral_start(struct ifnet *ifp)
BPF_MTAP(ifp, m0);
m0 = ieee80211_encap(ic, m0, ni);
if (m0 == NULL)
if (m0 == NULL) {
ieee80211_free_node(ni);
continue;
}
if (ic->ic_rawbpf != NULL)
bpf_mtap(ic->ic_rawbpf, m0);

View File

@ -1321,8 +1321,10 @@ ural_start(struct ifnet *ifp)
BPF_MTAP(ifp, m0);
m0 = ieee80211_encap(ic, m0, ni);
if (m0 == NULL)
if (m0 == NULL) {
ieee80211_free_node(ni);
continue;
}
if (ic->ic_rawbpf != NULL)
bpf_mtap(ic->ic_rawbpf, m0);