You are not logged in.

#1 2019-02-09 01:17:13

loqs
Member
Registered: 2014-03-06
Posts: 17,197

wpa_supplicant 2.7 issues

wpa_supplicant 2.7 was removed from the repositories due to https://bugs.archlinux.org/task/61119

Which may encompass two separate issues.  The original issue was encountered using the wl driver.
The reported upstream issue was using the brcmfmac driver and upstream noted the issues were separate here.

I tried to bisect the wl issue between 2.6 and 2.7 but after encountering tens of failure to builds abandonned
the attempt when it appeared a range of several hundreds commits including the cause would not build.
Looking at the failures to build I found they were caused by CONFIG_FILS=y in config.  Starting over 2.7 failed to
build without CONFIG_FILS=y until f2973fa39d6109f0f34969e91551a98dc340d537 was applied.
wpa_supplicant 2.7 then worked successfully for me using the wl driver.  (PKGBUILD attached below)
Can other users of the wl module replicate this?
The wl driver does not support and FILS functionality and have have not investigated why enabling it would cause a failure.

The brcmfmac issue I believe was resolved by 436ee2fd9330111da9c53f9c6d02242a9197593e and d896874f868987e22489c64efae5a0f62b070d47
The first commit needed to be adjusted to apply to 2.7 (adjusted patch below)
Can anyone using the brcmfmac driver test if the issue is still present without CONFIG_FILS=y
and if so does applying the two commits resolve the issue?

commit 50ad315e2f62801beb7f269df6b4f37119d17efc
Author: Arend van Spriel <arend.vanspriel@broadcom.com>
Date:   Mon Jan 7 12:14:40 2019 +0100

    drivers: Add separate driver flags for 802.1X and PSK 4-way HS offloads
    
    Allow drivers to indicate support for offloading 4-way handshake for
    either IEEE 802.1X (WPA2-Enterprise; EAP) and/or WPA/WPA2-PSK
    (WPA2-Personal) by splitting the WPA_DRIVER_FLAGS_4WAY_HANDSHAKE flag
    into two separate flags.
    
    Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
    (cherry picked from commit 436ee2fd9330111da9c53f9c6d02242a9197593e)

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 4ac9f16a0..af0c04197 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -914,10 +914,10 @@ struct wpa_driver_associate_params {
 	 * passphrase - RSN passphrase for PSK
 	 *
 	 * This value is made available only for WPA/WPA2-Personal (PSK) and
-	 * only for drivers that set WPA_DRIVER_FLAGS_4WAY_HANDSHAKE. This is
-	 * the 8..63 character ASCII passphrase, if available. Please note that
-	 * this can be %NULL if passphrase was not used to generate the PSK. In
-	 * that case, the psk field must be used to fetch the PSK.
+	 * only for drivers that set WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK. This
+	 * is the 8..63 character ASCII passphrase, if available. Please note
+	 * that this can be %NULL if passphrase was not used to generate the
+	 * PSK. In that case, the psk field must be used to fetch the PSK.
 	 */
 	const char *passphrase;
 
@@ -925,9 +925,9 @@ struct wpa_driver_associate_params {
 	 * psk - RSN PSK (alternative for passphrase for PSK)
 	 *
 	 * This value is made available only for WPA/WPA2-Personal (PSK) and
-	 * only for drivers that set WPA_DRIVER_FLAGS_4WAY_HANDSHAKE. This is
-	 * the 32-octet (256-bit) PSK, if available. The driver wrapper should
-	 * be prepared to handle %NULL value as an error.
+	 * only for drivers that set WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK. This
+	 * is the 32-octet (256-bit) PSK, if available. The driver wrapper
+	 * should be prepared to handle %NULL value as an error.
 	 */
 	const u8 *psk;
 
@@ -1457,7 +1457,7 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS_DFS_OFFLOAD			0x00000004
 /** Driver takes care of RSN 4-way handshake internally; PMK is configured with
  * struct wpa_driver_ops::set_key using alg = WPA_ALG_PMK */
-#define WPA_DRIVER_FLAGS_4WAY_HANDSHAKE 0x00000008
+#define WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_8021X		0x00000008
 /** Driver is for a wired Ethernet interface */
 #define WPA_DRIVER_FLAGS_WIRED		0x00000010
 /** Driver provides separate commands for authentication and association (SME in
@@ -1579,6 +1579,8 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS_MFP_OPTIONAL		0x0040000000000000ULL
 /** Driver is a self-managed regulatory device */
 #define WPA_DRIVER_FLAGS_SELF_MANAGED_REGULATORY       0x0080000000000000ULL
+/** Driver support 4-way handshake offload for WPA-Personal */
+#define WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK	0x0200000000000000ULL
 	u64 flags;
 
 #define FULL_AP_CLIENT_STATE_SUPP(drv_flags) \
diff --git a/src/drivers/driver_common.c b/src/drivers/driver_common.c
index ac0916e40..d9677ffb0 100644
--- a/src/drivers/driver_common.c
+++ b/src/drivers/driver_common.c
@@ -234,7 +234,8 @@ const char * driver_flag_to_string(u64 flag)
 	DF2S(DRIVER_IE);
 	DF2S(SET_KEYS_AFTER_ASSOC);
 	DF2S(DFS_OFFLOAD);
-	DF2S(4WAY_HANDSHAKE);
+	DF2S(4WAY_HANDSHAKE_PSK);
+	DF2S(4WAY_HANDSHAKE_8021X);
 	DF2S(WIRED);
 	DF2S(SME);
 	DF2S(AP);
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 871a5d0b4..3659f15bf 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -2962,7 +2962,7 @@ static int wpa_driver_nl80211_set_key(const char *ifname, struct i802_bss *bss,
 #endif /* CONFIG_DRIVER_NL80211_QCA */
 
 	if (alg == WPA_ALG_PMK &&
-	    (drv->capa.flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE))
+	    (drv->capa.flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_8021X))
 		return nl80211_set_pmk(drv, key, key_len, addr);
 
 	if (alg == WPA_ALG_NONE) {
@@ -5478,7 +5478,7 @@ static int nl80211_connect_common(struct wpa_driver_nl80211_data *drv,
 
 	/* Add PSK in case of 4-way handshake offload */
 	if (params->psk &&
-	    (drv->capa.flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE)) {
+	    (drv->capa.flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK)) {
 		wpa_hexdump_key(MSG_DEBUG, "  * PSK", params->psk, 32);
 		if (nla_put(msg, NL80211_ATTR_PMK, 32, params->psk))
 			return -1;
diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
index 7b360d209..288c7cce6 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -403,10 +403,11 @@ static void wiphy_info_ext_feature_flags(struct wiphy_info_data *info,
 		capa->flags |= WPA_DRIVER_FLAGS_FILS_SK_OFFLOAD;
 
 	if (ext_feature_isset(ext_features, len,
-			      NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK) &&
-	    ext_feature_isset(ext_features, len,
+			      NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK))
+		capa->flags |= WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK;
+	if (ext_feature_isset(ext_features, len,
 			      NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X))
-		capa->flags |= WPA_DRIVER_FLAGS_4WAY_HANDSHAKE;
+		capa->flags |= WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_8021X;
 
 	if (ext_feature_isset(ext_features, len,
 			      NL80211_EXT_FEATURE_MFP_OPTIONAL))
diff --git a/src/drivers/driver_openbsd.c b/src/drivers/driver_openbsd.c
index e94eda08f..c06e75c0f 100644
--- a/src/drivers/driver_openbsd.c
+++ b/src/drivers/driver_openbsd.c
@@ -62,7 +62,8 @@ static int
 wpa_driver_openbsd_get_capa(void *priv, struct wpa_driver_capa *capa)
 {
 	os_memset(capa, 0, sizeof(*capa));
-	capa->flags = WPA_DRIVER_FLAGS_4WAY_HANDSHAKE;
+	capa->flags = WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK |
+		      WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_8021X;
 	return 0;
 }
 
diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c
index 20abaab4c..5bd0cd11b 100644
--- a/src/drivers/driver_wext.c
+++ b/src/drivers/driver_wext.c
@@ -1645,7 +1645,8 @@ static int wpa_driver_wext_get_range(void *priv)
 		if (range->enc_capa & IW_ENC_CAPA_CIPHER_CCMP)
 			drv->capa.enc |= WPA_DRIVER_CAPA_ENC_CCMP;
 		if (range->enc_capa & IW_ENC_CAPA_4WAY_HANDSHAKE)
-			drv->capa.flags |= WPA_DRIVER_FLAGS_4WAY_HANDSHAKE;
+			drv->capa.flags |= WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK |
+				WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_8021X;
 		drv->capa.auth = WPA_DRIVER_AUTH_OPEN |
 			WPA_DRIVER_AUTH_SHARED |
 			WPA_DRIVER_AUTH_LEAP;
@@ -1676,7 +1677,7 @@ static int wpa_driver_wext_set_psk(struct wpa_driver_wext_data *drv,
 
 	wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
 
-	if (!(drv->capa.flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE))
+	if (!(drv->capa.flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_8021X))
 		return 0;
 
 	if (!psk)
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 37d429d33..a268d6241 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -2738,7 +2738,7 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
 	}
 	wpa_supplicant_cancel_scan(wpa_s);
 
-	if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE) &&
+	if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK) &&
 	    wpa_key_mgmt_wpa_psk(wpa_s->key_mgmt)) {
 		/*
 		 * We are done; the driver will take care of RSN 4-way
@@ -2748,7 +2748,7 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
 		wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
 		eapol_sm_notify_portValid(wpa_s->eapol, TRUE);
 		eapol_sm_notify_eap_success(wpa_s->eapol, TRUE);
-	} else if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE) &&
+	} else if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_8021X) &&
 		   wpa_key_mgmt_wpa_ieee8021x(wpa_s->key_mgmt)) {
 		/*
 		 * The driver will take care of RSN 4-way handshake, so we need
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index e587d7e3c..c2375899a 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -3055,7 +3055,7 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
 	}
 	params.wep_tx_keyidx = ssid->wep_tx_keyidx;
 
-	if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE) &&
+	if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK) &&
 	    (params.key_mgmt_suite == WPA_KEY_MGMT_PSK ||
 	     params.key_mgmt_suite == WPA_KEY_MGMT_FT_PSK)) {
 		params.passphrase = ssid->passphrase;
@@ -4059,7 +4059,7 @@ void wpa_supplicant_rx_eapol(void *ctx, const u8 *src_addr,
 	}
 
 	if (wpa_s->eapol_received == 0 &&
-	    (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE) ||
+	    (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK) ||
 	     !wpa_key_mgmt_wpa_psk(wpa_s->key_mgmt) ||
 	     wpa_s->wpa_state != WPA_COMPLETED) &&
 	    (wpa_s->current_ssid == NULL ||
@@ -4125,7 +4125,7 @@ void wpa_supplicant_rx_eapol(void *ctx, const u8 *src_addr,
 	    eapol_sm_rx_eapol(wpa_s->eapol, src_addr, buf, len) > 0)
 		return;
 	wpa_drv_poll(wpa_s);
-	if (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE))
+	if (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK))
 		wpa_sm_rx_eapol(wpa_s->wpa, src_addr, buf, len);
 	else if (wpa_key_mgmt_wpa_ieee8021x(wpa_s->key_mgmt)) {
 		/*
diff --git a/wpa_supplicant/wpas_glue.c b/wpa_supplicant/wpas_glue.c
index 4634ed7fc..ba924269d 100644
--- a/wpa_supplicant/wpas_glue.c
+++ b/wpa_supplicant/wpas_glue.c
@@ -296,7 +296,7 @@ static void wpa_supplicant_eapol_cb(struct eapol_sm *eapol,
 	}
 
 	if (result != EAPOL_SUPP_RESULT_SUCCESS ||
-	    !(wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE))
+	    !(wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_8021X))
 		return;
 
 	if (!wpa_key_mgmt_wpa_ieee8021x(wpa_s->key_mgmt))
# Maintainer:  Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Thomas Bächler <thomas@archlinux.org>

pkgname=wpa_supplicant-git
pkgver=hostap_2_7.r0.gc2c6c01bb
pkgrel=1
pkgdesc='A utility providing key negotiation for WPA wireless networks'
url='http://hostap.epitest.fi/wpa_supplicant'
arch=(x86_64)
license=(GPL)
depends=(openssl-1.0 libdbus readline libnl)
makedepends=(git docbook-utils docbook-sgml perl-sgmls)
provides=(wpa_supplicant)
conflicts=(wpa_supplicant)
install=wpa_supplicant.install
source=(git+https://w1.fi/hostap.git#commit=c2c6c01bb8b6fafc2074b46a53c4eab2c145ac6f
        config
)
validpgpkeys=('EC4AA0A991A5F2464582D52D2B6EF432EFC895FA') # Jouni Malinen
sha256sums=('SKIP'
            '6017610ff70520bc8af19d4bb704d9b7e234fa22bdeb14bb581cd5602d1366a6')

prepare() {
  cd hostap
  git cherry-pick -n f2973fa39d6109f0f34969e91551a98dc340d537
  cd ..
  cd hostap/wpa_supplicant

  cp "$srcdir/config" ./.config
}

pkgver() {
  cd hostap
  git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd hostap/wpa_supplicant

  export CFLAGS="$CPPFLAGS $CFLAGS -I/usr/include/openssl-1.0"
  export LIBS="-L/usr/lib/openssl-1.0"
  export LIBS_p="-L/usr/lib/openssl-1.0"

  make LIBDIR=/usr/lib BINDIR=/usr/bin -j1
  make LIBDIR=/usr/lib BINDIR=/usr/bin eapol_test
  make -C doc/docbook man
  rm -f doc/docbook/manpage.{links,refs}
}

package() {
  cd hostap/wpa_supplicant
  make LIBDIR=/usr/lib BINDIR=/usr/bin DESTDIR="$pkgdir" install
  install -Dm755 eapol_test "$pkgdir/usr/bin/eapol_test"

  install -d -m755 "$pkgdir/etc/wpa_supplicant"
  install -Dm644 wpa_supplicant.conf \
    "$pkgdir/usr/share/doc/wpa_supplicant/wpa_supplicant.conf"

  install -d -m755 "$pkgdir/usr/share/man/man"{5,8}
  install -m644 doc/docbook/*.5 "$pkgdir/usr/share/man/man5/"
  install -m644 doc/docbook/*.8 "$pkgdir/usr/share/man/man8/"
  rm -f "$pkgdir/usr/share/man/man8/wpa_"{priv,gui}.8

  install -d -m755 "$pkgdir/usr/share/dbus-1/system-services"
  install -m644 \
    dbus/fi.{epitest.hostap.WPASupplicant,w1.wpa_supplicant1}.service \
    "$pkgdir/usr/share/dbus-1/system-services/"

  install -Dm644 dbus/dbus-wpa_supplicant.conf \
    "$pkgdir/etc/dbus-1/system.d/wpa_supplicant.conf"

  install -d -m755 "$pkgdir/usr/lib/systemd/system"
  install -m644 systemd/*.service "$pkgdir/usr/lib/systemd/system/"
}

Edit:
b43 driver tested works with both CONFIG_FILS=y and CONFIG_FILS=n I have no hardware that can use brcmfmac to test with.

Last edited by loqs (2019-02-26 20:21:10)

Offline

#2 2019-03-09 00:30:09

dmartins
Member
Registered: 2006-09-23
Posts: 360

Re: wpa_supplicant 2.7 issues

loqs, I have an older laptop that uses the wl driver. It doesn't appear to be supported by the brcmfmac driver.
I can throw Arch on it if you're still looking for someone to test the wl driver with wpa_supplicant 2.7 & cherry-picked commit.

# lspci -knn
03:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM4352 802.11ac Wireless Network Adapter [14e4:43b1] (rev 03)
	Subsystem: AzureWave BCM4352 802.11ac Wireless Network Adapter [1a3b:2123]
	Kernel driver in use: wl

Offline

#3 2019-03-09 10:04:58

loqs
Member
Registered: 2014-03-06
Posts: 17,197

Re: wpa_supplicant 2.7 issues

That would be a great help thanks.

Offline

#4 2019-03-09 16:55:24

dmartins
Member
Registered: 2006-09-23
Posts: 360

Re: wpa_supplicant 2.7 issues

I think I'm getting different results with the wl driver. Using the PKGBUILD from your initial post, with config and wpa_supplicant.install files from this commit.

All scenarios build, but scanning fails with "Invalid argument"
CONFIG_FILS=y, without f2973fa39d6109f0f34969e91551a98dc340d537
CONFIG_FILS=y, with f2973fa39d6109f0f34969e91551a98dc340d537
CONFIG_FILS=n, without f2973fa39d6109f0f34969e91551a98dc340d537
CONFIG_FILS=n, with f2973fa39d6109f0f34969e91551a98dc340d537

wlp3s0: Control interface command 'SCAN'
wlp3s0: Setting scan request: 0.000000 sec
CTRL-DEBUG: ctrl_sock-sendto: sock=13 sndbuf=212992 outq=0 send_len=3
wlp3s0: State: DISCONNECTED -> SCANNING
wlp3s0: Starting AP scan for wildcard SSID
wlp3s0: Add radio work 'scan'@0x55a9cf849b50
wlp3s0: First radio work item in the queue - schedule start immediately
wlp3s0: Starting radio work 'scan'@0x55a9cf849b50 after 0.000031 second wait
wlp3s0: nl80211: scan request
nl80211: Scan SSID - hexdump_ascii(len=0): [NULL]
nl80211: Scan extra IEs - hexdump(len=12): 7f 0a 00 00 00 00 00 00 00 00 00 01
nl80211: Scan trigger failed: ret=-22 (Invalid argument)
wlp3s0: State: SCANNING -> DISCONNECTED
nl80211: Set wlp3s0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22

I'll be out most of the day, but can try to bisect this tomorrow and see if I get different results still.
To rule out that one of these attempts put the card or driver in an inconsistent state, I switched back to wpa_supplicant 2.6 without rebooting, and scanning works on the first attempt.

Last edited by dmartins (2019-03-09 16:57:37)

Offline

#5 2019-03-09 17:18:58

loqs
Member
Registered: 2014-03-06
Posts: 17,197

Re: wpa_supplicant 2.7 issues

I have been testing using

# wpa_supplicant -dd -i $DEV -c <(wpa_passphrase $SSID $PSK)

so I have not checked scanning will check now.
Edit:
scanning works on this system.
Edit2:
It is broken here now build directory was from an abandoned bisect and I did not clean it.  Will start bisecting here again.
Edit3:
With CONFIG_FILS=n so far (lots of failure to builds)

git bisect log
git bisect start
# good: [2462f347bca0a7cce7e06ff88adbe3aa47c52d54] Change version number to v2.6 for the release
git bisect good 2462f347bca0a7cce7e06ff88adbe3aa47c52d54
# bad: [c2c6c01bb8b6fafc2074b46a53c4eab2c145ac6f] Update version to v2.7 and copyright years to include 2018
git bisect bad c2c6c01bb8b6fafc2074b46a53c4eab2c145ac6f
# bad: [3db2a82df827608fd5d0860781c6e6fa1023ba8d] Add SHA-384 routines to libcrypto.a
git bisect bad 3db2a82df827608fd5d0860781c6e6fa1023ba8d
# skip: [adc6a5d81a895ded4f86216e8307eefcb7f3dfde] mesh: Check remote peer HT Operation element
git bisect skip adc6a5d81a895ded4f86216e8307eefcb7f3dfde
# skip: [baa8f5ba26f17266930dcf2db6fa4bc97e3e371c] tests: hostapd stationary_ap=1 in neighbor DB
git bisect skip baa8f5ba26f17266930dcf2db6fa4bc97e3e371c
# skip: [05e5e615e6a26d7a9f5bd0569a0baeae1bcdee49] AP: Skip authentication/deauthentication phase for DMG/IEEE 802.11ad
git bisect skip 05e5e615e6a26d7a9f5bd0569a0baeae1bcdee49
# bad: [d506c35efc9177cf622bc19b9860d9f7f5554536] Set Wi-Fi Configuration attribute to restrict offchannel operations
git bisect bad d506c35efc9177cf622bc19b9860d9f7f5554536
# skip: [1fb1bf99d6ee5ca54bb4bcd50e3ecdd410f0c9a7] Write sec_device_type to configuration file
git bisect skip 1fb1bf99d6ee5ca54bb4bcd50e3ecdd410f0c9a7
# skip: [2901bc2725aca3f465856ae5520eb4b4fa6ebe54] bgscan: Remove unnecessary NULL check
git bisect skip 2901bc2725aca3f465856ae5520eb4b4fa6ebe54
# skip: [c06fca04fd43be1498d36e6eefe6d69a2ca7863f] Add wpa_supplicant SET get_pref_freq_list_override
git bisect skip c06fca04fd43be1498d36e6eefe6d69a2ca7863f
# skip: [167f78a5e8fa4736f433667a964c30536e5d6bc7] Send BEACON-REQ-TX-STATUS event only for beacon reports
git bisect skip 167f78a5e8fa4736f433667a964c30536e5d6bc7
# skip: [7655bd7388f82e67a2d0461ccab0ae037bb8cd77] P2P: Do not use wait_time for SD Response TX without fragmentation
git bisect skip 7655bd7388f82e67a2d0461ccab0ae037bb8cd77
# skip: [b4bdeadfaff5b2147d95740f4a049f39de5fa759] Make "SET" behavior more consistent for dot11RSNA parameters
git bisect skip b4bdeadfaff5b2147d95740f4a049f39de5fa759
# skip: [4a45dc192112c9c37627478096f60f95a66070b3] mesh: Show [MESH] flag in print_bss_info()
git bisect skip 4a45dc192112c9c37627478096f60f95a66070b3
# bad: [e8e430fe7a98119ca20afa676909fdf035b35228] Vendor attributes to retain connection on a roam request failure
git bisect bad e8e430fe7a98119ca20afa676909fdf035b35228
# skip: [9284418d00614d9187226d6352260c35ceee142c] Fix writing of wpa_supplicant sae_groups configuration parameter
git bisect skip 9284418d00614d9187226d6352260c35ceee142c
# skip: [adbc89ebd44511276a5bdce054ed69584b75c57c] tests: hostapd and RADAR ctrl_iface command
git bisect skip adbc89ebd44511276a5bdce054ed69584b75c57c
# skip: [befdb2dc8dae6b8d6a9eb9b662b2da19481616f9] nl80211: Check driver FILS capability
git bisect skip befdb2dc8dae6b8d6a9eb9b662b2da19481616f9
# skip: [a9491695b30a7f750dc45cb563d813b03f1d4b8d] QCA vendor command to set/get NUD statistics
git bisect skip a9491695b30a7f750dc45cb563d813b03f1d4b8d
# skip: [f58afccdddd66bcb28aa0005fc4c90a7cd29d8d5] wlantest: Add initial support for FT-EAP decryption
git bisect skip f58afccdddd66bcb28aa0005fc4c90a7cd29d8d5
# skip: [e91877fb62e8c0509e661f6094cb67f62fc095f5] tests: Mesh and HT40 support difference
git bisect skip e91877fb62e8c0509e661f6094cb67f62fc095f5
# skip: [0a63635ed039006c03abc492a9b03a8f787512b0] AP: Use valid status code in wpa_ft_send_rrb_auth_resp()
git bisect skip 0a63635ed039006c03abc492a9b03a8f787512b0
# skip: [7f73fbd5ef0934293ad0a309fae95007b1df32cc] tests: AP with long preamble
git bisect skip 7f73fbd5ef0934293ad0a309fae95007b1df32cc
# skip: [ad51731abf06efb284d020578eb34e7b1daeb23e] wpa_supplicant: Allow pre-shared (CAK,CKN) pair for MKA
git bisect skip ad51731abf06efb284d020578eb34e7b1daeb23e
# skip: [6a31440b86b182452fc87bcdb2a81f95242fb0c6] Fix LCI request subelement processing
git bisect skip 6a31440b86b182452fc87bcdb2a81f95242fb0c6
# bad: [3dcd735c1eea9653692f4dfade8697aedaa04ea5] DFS: Handle CAC completion event from other radio
git bisect bad 3dcd735c1eea9653692f4dfade8697aedaa04ea5
# skip: [d8de904872973034108fc804816c31ecdf400660] Remove deprecated tx_queue_* params from hostapd.conf notes
git bisect skip d8de904872973034108fc804816c31ecdf400660
# skip: [8618b3c2219ef9f644ed6f825a6501d7f1663082] tests: Open AP and TDLS prohibited
git bisect skip 8618b3c2219ef9f644ed6f825a6501d7f1663082
# skip: [b157f0e265b83f5a181bb5f78bd9bf33b7f9f92d] tests: wpa_supplicant and concurrent NEIGHBOR_REP_REQUEST commands
git bisect skip b157f0e265b83f5a181bb5f78bd9bf33b7f9f92d
# skip: [20c846d9ee25ac14d0a9ca414a6816deab7e921f] nl80211: sched_scan relative RSSI parameters
git bisect skip 20c846d9ee25ac14d0a9ca414a6816deab7e921f
# skip: [d734201435d68094e0a93b85503edb29cb5b9a24] RRM: Enable beacon report with active/passive scan for all drivers
git bisect skip d734201435d68094e0a93b85503edb29cb5b9a24
# skip: [7d3f18d72c3c883112ee927fc402c0eaed09ff65] tests: Allow multiple management frames to be used with ap-mgmt-fuzzer
git bisect skip 7d3f18d72c3c883112ee927fc402c0eaed09ff65
# skip: [35677305896cd3561deaf84ac513258104b67e93] RADIUS server: Increase maximum number of sessions
git bisect skip 35677305896cd3561deaf84ac513258104b67e93
# skip: [e0d9fd344d20bb35efcd5c37ece0a5d67632439d] wpa_supplicant: Allow configuring the MACsec port for MKA
git bisect skip e0d9fd344d20bb35efcd5c37ece0a5d67632439d

Edit4:
bisection points to as the first bad commit e4d2ce1b52b2dd866f1fd54d79dbd276689cb927
Edit5:
The commit will not revert cleanly with 2.7 test patch to see if it is the cause (CONFIG_FILS=n leaves CONFIG_FILS defined)

diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index e587d7e3c..69c4ccb72 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1690,7 +1690,7 @@ static void wpas_ext_capab_byte(struct wpa_supplicant *wpa_s, u8 *pos, int idx)
                        *pos |= 0x80; /* Bit 71 - FTM initiator */
                break;
        case 9: /* Bits 72-79 */
-#ifdef CONFIG_FILS
+#if 0
                if (!wpa_s->disable_fils)
                        *pos |= 0x01;
 #endif /* CONFIG_FILS */

Last edited by loqs (2019-03-09 21:40:59)

Offline

#6 2019-03-10 23:05:40

dmartins
Member
Registered: 2006-09-23
Posts: 360

Re: wpa_supplicant 2.7 issues

I thought I would see if the latest development version of wpa_supplicant worked with the wl driver, and if it did, work backwards towards 2.7 to see if there was a particular commit that fixed things. Initially, the latest commit worked and I was able to connect to my access point and get an IP address via DHCP. But, several times a minute I was getting disconnected from the AP, and then reconnecting a second or two later.
I stopped wpa_supplicant, and tried connecting again but now I can't connect at all. I went back to wpa_supplicant 2.6 from the repos and now it doesn't work either! Oops. I'l have to fiddle with it some more.

The PKGBUILD is below. At the time, HEAD was commit ca9efe113c6f525a11694adb009dfff4be5e166d.

# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=wpa_supplicant-git
pkgver=2.7.r579.gca9efe113
pkgrel=1
pkgdesc="A daemon program controlling the wireless connection"
arch=('i686' 'x86_64')
url="https://w1.fi/wpa_supplicant/"
license=('BSD')
depends=('glibc' 'openssl' 'libdbus' 'libnl' 'readline')
optdepends=('wpa_supplicant_gui: GUI frontend')
makedepends=('git')
provides=('wpa_supplicant')
conflicts=('wpa_supplicant')
source=("git://w1.fi/hostap.git"
        "config::https://git.archlinux.org/svntogit/packages.git/plain/trunk/config?h=packages/wpa_supplicant")
sha256sums=('SKIP'
            'SKIP')


prepare() {
  cd "$srcdir"

  echo "CONFIG_OWE=y" >> "$srcdir/config"
}

pkgver() {
  cd "hostap/wpa_supplicant"

  git describe --long --tags | sed 's/^hostap_//;s/\([^-]*-g\)/r\1/;s/[_-]/./g'
}

build() {
  cd "hostap/wpa_supplicant"

  cp "$srcdir/config" ".config"

  export CFLAGS="$CPPFLAGS $CFLAGS"
  make LIBDIR="/usr/lib" BINDIR="/usr/bin"
  make LIBDIR="/usr/lib" BINDIR="/usr/bin" eapol_test
}

package() {
  cd "hostap/wpa_supplicant"

  make LIBDIR="/usr/lib" BINDIR="/usr/bin" DESTDIR="$pkgdir" install

  install -Dm755 "eapol_test" "$pkgdir/usr/bin/eapol_test"

  install -d -m755 "$pkgdir/etc/wpa_supplicant"
  install -Dm644 "wpa_supplicant.conf" "$pkgdir/usr/share/doc/wpa_supplicant/wpa_supplicant.conf"

  install -d -m755 "$pkgdir/usr/share/dbus-1/system-services"
  
  # This has been dropped recently (6a8dee76d4090287c016680c009b1334e01b5fbd)
  if [ -f dbus/fi.epitest.hostap.WPASupplicant.service ]; then
      install -m644 "dbus/fi.epitest.hostap.WPASupplicant.service" "$pkgdir/usr/share/dbus-1/system-services/"
  fi
  install -m644 "dbus/fi.w1.wpa_supplicant1.service" "$pkgdir/usr/share/dbus-1/system-services/"

  install -Dm644 "dbus/dbus-wpa_supplicant.conf" "$pkgdir/etc/dbus-1/system.d/wpa_supplicant.conf"

  install -d -m755 "$pkgdir/usr/lib/systemd/system"
  install -m644 systemd/*.service "$pkgdir/usr/lib/systemd/system/"

  sed -n '/This software may/,/OF SUCH DAMAGE./p' "README" > "COPYING"
  install -Dm644 "COPYING" "$pkgdir/usr/share/licenses/wpa_supplicant/COPYING"
}

Offline

#7 2019-03-11 00:34:01

loqs
Member
Registered: 2014-03-06
Posts: 17,197

Re: wpa_supplicant 2.7 issues

ca9efe113c6f525a11694adb009dfff4be5e166d works as with the config from https://git.archlinux.org/svntogit/pack … supplicant
I went back to 2.7 c2c6c01bb8b6fafc2074b46a53c4eab2c145ac6f that would not build without f2973fa39d6109f0f34969e91551a98dc340d537 with that applied that then worked
If I add CONFIG_FILS to the config with any value that fails without the patch from #5.

Offline

#8 2019-03-11 18:55:13

dmartins
Member
Registered: 2006-09-23
Posts: 360

Re: wpa_supplicant 2.7 issues

I started over, and so far can confirm what you're seeing.

Version 2.7 - tag: hostap_2_7 commit: c2c6c01bb8b6fafc2074b46a53c4eab2c145ac6f
Builds when CONFIG_FILS is defined as either 'y' or 'n', but cannot connect to AP.

wlp3s0: State: DISCONNECTED -> SCANNING
wlp3s0: Starting AP scan for wildcard SSID
wlp3s0: Add radio work 'scan'@0x559463437e50
wlp3s0: First radio work item in the queue - schedule start immediately
wlp3s0: Starting radio work 'scan'@0x559463437e50 after 0.000142 second wait
wlp3s0: nl80211: scan request
nl80211: Scan SSID - hexdump_ascii(len=0): [NULL]
nl80211: Scan extra IEs - hexdump(len=12): 7f 0a 00 00 00 00 00 00 00 00 00 01
nl80211: Scan trigger failed: ret=-22 (Invalid argument)
wlp3s0: State: SCANNING -> DISCONNECTED

With CONFIG_FILS undefined, it will not build

sme.c: In function ‘sme_associate’:
sme.c:1608:3: warning: implicit declaration of function ‘remove_ie’; did you mean ‘remove’? [-Wimplicit-function-declaration]
   remove_ie(wpa_s->sme.assoc_req_ie,
   ^~~~~~~~~
   remove
  CC  sme.c
...
snip
...
  CC  ../src/drivers/drivers.c
  CC  ../src/l2_packet/l2_packet_linux.c
/usr/bin/ld: sme.o: in function `sme_associate':
sme.c:(.text+0xda4): undefined reference to `remove_ie'
/usr/bin/ld: sme.c:(.text+0xdb7): undefined reference to `remove_ie'
/usr/bin/ld: sme.c:(.text+0xdca): undefined reference to `remove_ie'
/usr/bin/ld: sme.c:(.text+0xe14): undefined reference to `remove_ie'
collect2: error: ld returned 1 exit status
make: *** [Makefile:1892: wpa_supplicant] Error 1

Finally, applying commit f2973fa39d6109f0f34969e91551a98dc340d537, tag hostap_2_7 will build when CONFIG_FILS is undefined, and can successfully connect to the AP.

Offline

Board footer

Powered by FluxBB