diff options
author | sam <sam@FreeBSD.org> | 2005-07-08 16:31:19 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-07-08 16:31:19 +0000 |
commit | 0cb398882171aeb5d6dfa0d58e7fdca26e992e4b (patch) | |
tree | 435fe0e317aeff9e831363dcfa89974c3c5f4dec /sys/dev/ral | |
parent | d5bd29fcc22eba37200f1eb9ee6ba086c9a3bf79 (diff) | |
download | FreeBSD-src-0cb398882171aeb5d6dfa0d58e7fdca26e992e4b.zip FreeBSD-src-0cb398882171aeb5d6dfa0d58e7fdca26e992e4b.tar.gz |
reclaim node reference when ieee80211_encap fails
Reviewed by: avatar
Approved by: re (scottl)
Diffstat (limited to 'sys/dev/ral')
-rw-r--r-- | sys/dev/ral/if_ral.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/ral/if_ral.c b/sys/dev/ral/if_ral.c index 9877a3d..b1962e9 100644 --- a/sys/dev/ral/if_ral.c +++ b/sys/dev/ral/if_ral.c @@ -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); |