wlan - Bring in some fixes from FreeBSD.
authorJoe Talbott <josepht@dragonflybsd.org>
Fri, 11 Jun 2010 17:48:45 +0000 (13:48 -0400)
committerJoe Talbott <josepht@dragonflybsd.org>
Fri, 11 Jun 2010 17:49:46 +0000 (13:49 -0400)
sys/netproto/802_11/wlan/ieee80211_hwmp.c
sys/netproto/802_11/wlan/ieee80211_ioctl.c
sys/netproto/802_11/wlan/ieee80211_scan_sta.c
sys/netproto/802_11/wlan/ieee80211_sta.c

index 6bfa02f..f947fd6 100644 (file)
@@ -707,6 +707,10 @@ hwmp_recv_preq(struct ieee80211vap *vap, struct ieee80211_node *ni,
        rtorig = ieee80211_mesh_rt_find(vap, preq->preq_origaddr);
        if (rtorig == NULL)
                rtorig = ieee80211_mesh_rt_add(vap, preq->preq_origaddr);
+       if (rtorig == NULL) {
+               /* XXX stat */
+               return;
+       }
        hrorig = IEEE80211_MESH_ROUTE_PRIV(rtorig, struct ieee80211_hwmp_route);
        /*
         * Sequence number validation.
index bdd6b09..38d6054 100644 (file)
@@ -1593,8 +1593,10 @@ ieee80211_ioctl_setchanlist(struct ieee80211vap *vap, struct ieee80211req *ireq)
        if (list == NULL)
                return ENOMEM;
        error = copyin(ireq->i_data, list, ireq->i_len);
-       if (error)
+       if (error) {
+               free(list, M_TEMP);
                return error;
+       }
        nchan = 0;
        chanlist = list + ireq->i_len;          /* NB: zero'd already */
        maxchan = ireq->i_len * NBBY;
@@ -1610,8 +1612,10 @@ ieee80211_ioctl_setchanlist(struct ieee80211vap *vap, struct ieee80211req *ireq)
                        nchan++;
                }
        }
-       if (nchan == 0)
+       if (nchan == 0) {
+               free(list, M_TEMP);
                return EINVAL;
+       }
        if (ic->ic_bsschan != IEEE80211_CHAN_ANYC &&    /* XXX */
            isclr(chanlist, ic->ic_bsschan->ic_ieee))
                ic->ic_bsschan = IEEE80211_CHAN_ANYC;
index 15d9ee6..c8c4c28 100644 (file)
@@ -1017,7 +1017,7 @@ match_bss(struct ieee80211vap *vap,
                 */
                if (se->se_capinfo & (IEEE80211_CAPINFO_IBSS|IEEE80211_CAPINFO_ESS))
                        fail |= MATCH_CAPINFO;
-               else if (se->se_meshid == NULL)
+               else if (&se->se_meshid == NULL)
                        fail |= MATCH_MESH_NOID;
                else if (ms->ms_idlen != 0 &&
                    match_id(se->se_meshid, ms->ms_id, ms->ms_idlen))
index 137eae6..210718f 100644 (file)
@@ -581,7 +581,7 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
                }
                IEEE80211_RSSI_LPF(ni->ni_avgrssi, rssi);
                ni->ni_noise = nf;
-               if (HAS_SEQ(type)) {
+               if (HAS_SEQ(type) && !IEEE80211_IS_MULTICAST(wh->i_addr1)) {
                        uint8_t tid = ieee80211_gettid(wh);
                        if (IEEE80211_QOS_HAS_SEQ(wh) &&
                            TID_TO_WME_AC(tid) >= WME_AC_VI)