diff options
-rw-r--r-- | sys/net80211/ieee80211_input.c | 12 | ||||
-rw-r--r-- | sys/net80211/ieee80211_node.c | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 035899c5..b88f4f1 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -709,10 +709,8 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0, #endif if (ni == NULL) { ni = ieee80211_alloc_node(ic, wh->i_addr2); - if (ni == NULL) { - ic->ic_stats.is_rx_nodealloc++; + if (ni == NULL) return; - } ni->ni_esslen = ssid[1]; memset(ni->ni_essid, 0, sizeof(ni->ni_essid)); memcpy(ni->ni_essid, ssid + 2, ssid[1]); @@ -789,10 +787,8 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0, if (ni == ic->ic_bss) { ni = ieee80211_dup_bss(ic, wh->i_addr2); - if (ni == NULL) { - ic->ic_stats.is_rx_nodealloc++; + if (ni == NULL) return; - } IEEE80211_DPRINTF(("%s: new req from %s\n", __func__, ether_sprintf(wh->i_addr2))); allocbs = 1; @@ -869,10 +865,8 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0, } if (ni == ic->ic_bss) { ni = ieee80211_alloc_node(ic, wh->i_addr2); - if (ni == NULL) { - ic->ic_stats.is_rx_nodealloc++; + if (ni == NULL) return; - } IEEE80211_ADDR_COPY(ni->ni_bssid, ic->ic_bss->ni_bssid); ni->ni_rssi = rssi; ni->ni_rstamp = rstamp; diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 447b1de..65fe2a3 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -470,6 +470,8 @@ ieee80211_alloc_node(struct ieee80211com *ic, u_int8_t *macaddr) struct ieee80211_node *ni = (*ic->ic_node_alloc)(ic); if (ni != NULL) ieee80211_setup_node(ic, ni, macaddr); + else + ic->ic_stats.is_rx_nodealloc++; return ni; } |