Ticket #835: keyix-reset-nodeleave.diff

File keyix-reset-nodeleave.diff, 1.5 kB (added by matt@mattb.net.nz, 6 years ago)

Fix bug by calling node_leave

  • net80211/ieee80211_node.c

    old new  
    14751475        TAILQ_FOREACH_SAFE(ni, &nt->nt_node, ni_list, next) { 
    14761476                if (match != NULL && ni->ni_vap != match) 
    14771477                        continue; 
    1478                 if (ni->ni_associd != 0) { 
    1479                         struct ieee80211vap *vap = ni->ni_vap; 
    1480  
    1481                         if (vap->iv_auth->ia_node_leave != NULL) 
    1482                                 vap->iv_auth->ia_node_leave(ni); 
    1483                         if (vap->iv_aid_bitmap != NULL) 
    1484                                 IEEE80211_AID_CLR(vap, ni->ni_associd); 
    1485                 } 
    1486                 node_reclaim(nt, ni); 
     1478                ieee80211_node_leave(ni); 
    14871479        } 
    14881480        IEEE80211_NODE_UNLOCK_IRQ(nt); 
    14891481} 
     
    14941486        struct ieee80211_node *ni, *next; 
    14951487 
    14961488        TAILQ_FOREACH_SAFE(ni, &nt->nt_node, ni_list, next) { 
    1497                 if (ni->ni_associd != 0) { 
    1498                         struct ieee80211vap *vap = ni->ni_vap; 
    1499  
    1500                         if (vap->iv_auth->ia_node_leave != NULL) 
    1501                                 vap->iv_auth->ia_node_leave(ni); 
    1502                         if (vap->iv_aid_bitmap != NULL) 
    1503                                 IEEE80211_AID_CLR(vap, ni->ni_associd); 
    1504                 } 
    1505                 node_reclaim(nt, ni); 
     1489                ieee80211_node_leave(ni); 
    15061490        } 
    15071491        del_timer(&nt->nt_wds_aging_timer); 
    15081492        IEEE80211_SCAN_LOCK_DESTROY(nt); 
     
    19501934         * we need to do is reclaim the reference. 
    19511935         */ 
    19521936        /* XXX ibss mode bypasses 11g and notification */ 
    1953         if (ni->ni_associd == 0) 
     1937        if (ni->ni_associd == 0) { 
     1938                // Call the node cleanup routine to release resources         
     1939                ic->ic_node_cleanup(ni); 
    19541940                goto done; 
     1941        } 
     1942 
    19551943        /* 
    19561944         * Tell the authenticator the station is leaving. 
    19571945         * Note that we must do this before yanking the