ap_scan is not supported in wpa_supplicant on OpenBSD and breaks things if

used but maybe present in some sample configs - disable the option if set
to avoid one possible source of errors
This commit is contained in:
sthen 2019-12-28 17:50:11 +00:00
parent 718517b82d
commit 276848c429
2 changed files with 25 additions and 2 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.46 2019/12/28 17:45:52 sthen Exp $
# $OpenBSD: Makefile,v 1.47 2019/12/28 17:50:11 sthen Exp $
COMMENT= IEEE 802.1X supplicant
DISTNAME= wpa_supplicant-2.8
REVISION= 1
REVISION= 2
CATEGORIES= security net
HOMEPAGE= https://w1.fi/wpa_supplicant/

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-wpa_supplicant_scan_c,v 1.1 2019/12/28 17:50:11 sthen Exp $
ap_scan is not supported on OpenBSD.
Index: wpa_supplicant/scan.c
--- wpa_supplicant/scan.c.orig
+++ wpa_supplicant/scan.c
@@ -869,6 +869,15 @@ static void wpa_supplicant_scan(void *eloop_ctx, void
wpas_notify_ap_scan_changed(wpa_s);
}
+#ifdef __OpenBSD__
+ if (wpa_s->conf->ap_scan != 0) {
+ wpa_dbg(wpa_s, MSG_DEBUG, "Using OpenBSD - "
+ "overriding ap_scan configuration");
+ wpa_s->conf->ap_scan = 0;
+ wpas_notify_ap_scan_changed(wpa_s);
+ }
+#endif
+
if (wpa_s->conf->ap_scan == 0) {
wpa_supplicant_gen_assoc_event(wpa_s);
return;