From: stsp Date: Tue, 12 Dec 2017 13:58:19 +0000 (+0000) Subject: Don't dereference IEEE80211_CHAN_ANYC pointer in ieee80211_node_checkrssi(). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=49a206bde5df359bedba72463ee921a954120ece;p=openbsd Don't dereference IEEE80211_CHAN_ANYC pointer in ieee80211_node_checkrssi(). Problem reported by Gregoire Jadi on bugs@ --- diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 57641fac24a..4951e37790a 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.c,v 1.124 2017/12/12 13:38:10 phessler Exp $ */ +/* $OpenBSD: ieee80211_node.c,v 1.125 2017/12/12 13:58:19 stsp Exp $ */ /* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */ /*- @@ -995,6 +995,9 @@ ieee80211_node_checkrssi(struct ieee80211com *ic, { uint8_t thres; + if (ni->ni_chan == IEEE80211_CHAN_ANYC) + return 0; + if (ic->ic_max_rssi) { thres = (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) ? IEEE80211_RSSI_THRES_RATIO_2GHZ :