diff options
author | 2020-07-20 07:45:44 +0000 | |
---|---|---|
committer | 2020-07-20 07:45:44 +0000 | |
commit | eb9f82c07609018e2399871097d3b4074e5cc66d (patch) | |
tree | 6c0197b4255728e66534721ec4e450f773020820 /sys | |
parent | use timeout_del_barrier(9) for del_timer_sync() (diff) | |
download | wireguard-openbsd-eb9f82c07609018e2399871097d3b4074e5cc66d.tar.xz wireguard-openbsd-eb9f82c07609018e2399871097d3b4074e5cc66d.zip |
The IEEE80211_F_HIDENWID flag is now part of ic_userflags, not ic_flags.
Fix code which was still looking for this flag at the old location.
The 'hidenwid' feature was slightly broken as a result: The SSID was leaked
in probe responses to wildcard probe requests. There are other trivial ways
of snooping a "hidden" SSID however so this is not a big deal.
Problem reported by Mogens Jensen.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/bwfm.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/rt2560.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/rt2661.c | 4 | ||||
-rw-r--r-- | sys/net80211/ieee80211_input.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/ic/bwfm.c b/sys/dev/ic/bwfm.c index 8942bc3b479..1c129d788df 100644 --- a/sys/dev/ic/bwfm.c +++ b/sys/dev/ic/bwfm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwfm.c,v 1.73 2020/07/10 13:26:37 patrick Exp $ */ +/* $OpenBSD: bwfm.c,v 1.74 2020/07/20 07:45:44 stsp Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2016,2017 Patrick Wildt <patrick@blueri.se> @@ -1959,7 +1959,7 @@ bwfm_hostap(struct bwfm_softc *sc) memset(join.assoc.bssid, 0xff, sizeof(join.assoc.bssid)); bwfm_fwvar_cmd_set_data(sc, BWFM_C_SET_SSID, &join, sizeof(join)); bwfm_fwvar_var_set_int(sc, "closednet", - (ic->ic_flags & IEEE80211_F_HIDENWID) != 0); + (ic->ic_userflags & IEEE80211_F_HIDENWID) != 0); } #endif diff --git a/sys/dev/ic/rt2560.c b/sys/dev/ic/rt2560.c index 0cea2f80840..59d12c0ac53 100644 --- a/sys/dev/ic/rt2560.c +++ b/sys/dev/ic/rt2560.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2560.c,v 1.87 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: rt2560.c,v 1.88 2020/07/20 07:45:44 stsp Exp $ */ /*- * Copyright (c) 2005, 2006 @@ -1588,7 +1588,7 @@ rt2560_tx_bcn(struct rt2560_softc *sc, struct mbuf *m0, mtod(m0, uint8_t *) + sizeof (struct ieee80211_frame) + 8 + 2 + 2 + - ((ic->ic_flags & IEEE80211_F_HIDENWID) ? + ((ic->ic_userflags & IEEE80211_F_HIDENWID) ? 1 : 2 + ni->ni_esslen) + 2 + min(ni->ni_rates.rs_nrates, IEEE80211_RATE_SIZE) + 2 + 1 + diff --git a/sys/dev/ic/rt2661.c b/sys/dev/ic/rt2661.c index 7170cb0085c..bdb7f15e5db 100644 --- a/sys/dev/ic/rt2661.c +++ b/sys/dev/ic/rt2661.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2661.c,v 1.97 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: rt2661.c,v 1.98 2020/07/20 07:45:44 stsp Exp $ */ /*- * Copyright (c) 2006 @@ -2935,7 +2935,7 @@ rt2661_prepare_beacon(struct rt2661_softc *sc) RT2661_HW_BEACON_BASE0 + 24 + sizeof (struct ieee80211_frame) + 8 + 2 + 2 + - ((ic->ic_flags & IEEE80211_F_HIDENWID) ? + ((ic->ic_userflags & IEEE80211_F_HIDENWID) ? 1 : 2 + ni->ni_esslen) + 2 + min(ni->ni_rates.rs_nrates, IEEE80211_RATE_SIZE) + 2 + 1 + diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 098aa9bce19..6ea9bfe3d3a 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_input.c,v 1.218 2020/06/01 08:51:13 stsp Exp $ */ +/* $OpenBSD: ieee80211_input.c,v 1.219 2020/07/20 07:45:44 stsp Exp $ */ /*- * Copyright (c) 2001 Atsushi Onoe @@ -1937,7 +1937,7 @@ ieee80211_recv_probe_req(struct ieee80211com *ic, struct mbuf *m, return; } /* refuse wildcard SSID if we're hiding our SSID in beacons */ - if (ssid[1] == 0 && (ic->ic_flags & IEEE80211_F_HIDENWID)) { + if (ssid[1] == 0 && (ic->ic_userflags & IEEE80211_F_HIDENWID)) { DPRINTF(("wildcard SSID rejected")); ic->ic_stats.is_rx_ssidmismatch++; return; |