From 49a206bde5df359bedba72463ee921a954120ece Mon Sep 17 00:00:00 2001 From: stsp Date: Tue, 12 Dec 2017 13:58:19 +0000 Subject: [PATCH] Don't dereference IEEE80211_CHAN_ANYC pointer in ieee80211_node_checkrssi(). Problem reported by Gregoire Jadi on bugs@ --- sys/net80211/ieee80211_node.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 : -- 2.20.1