On Wed, Feb 05, 2025 at 04:19:39PM +0100, Nico Sonack wrote:
> On Wednesday, 5 February 2025 14:25:01 CET Bjoern A. Zeeb wrote:
> > > wpa_supplicant:
> > > wpa_supplicant[36003]: bsd_set_key: unknown alg=4
> >
> > alg=4 would be WPA_ALG_BIP_CMAC_128 which is in in the file:
> >
> > 384 case WPA_ALG_BIP_CMAC_128:
> > 385 wk.ik_type = IEEE80211_CIPHER_BIP_CMAC_128;
> > 386 break;
> > 387 default:
> >
> > so I am a bit confused as to why it would log the default case below.
> > Oh, this is main where Adrian has added the placeholders. Let me check
> > stable/14. Yepp, there they are not avail and the deault printf is
> > expected.
> Urgh yes, that is a good point. I have experimented here before and applied
> https://reviews.freebsd.org/rG05540e62e75f8b2de7e337738eacfb0b159515a6 without
> reverting the change. I am going to revert this change and recompile the
> kernel.
>
> I am going to test this tomorrow since this is my workstation at $WORK.
>
> > Can you actually add proto=WPA2 as indicated in the Subject line and see
> > what happens?
After having a clean kernel source tree of 14.2-RELEASE and a clean
wpa_supplicant from base as well as setting proto=WPA2:
# service netif start wlan0 && wpa_cli log_level debug
....
# tail -fq /var/log/messages /var/log/debug.log
...
wpa_supplicant[37401]: wlan0: Starting radio work
'connect'@0x295c64410500 after 0.000045 second wait
wpa_supplicant[37401]: wlan0: WPA: clearing own WPA/RSN IE
wpa_supplicant[37401]: wlan0: RSN: clearing own RSNXE
wpa_supplicant[37401]: RSN: PMKSA cache search -
network_ctx=0x295c64450000 try_opportunistic=0 akmp=0x0
wpa_supplicant[37401]: RSN: Search for BSSID **:**:**:**:**:**
wpa_supplicant[37401]: RSN: No PMKSA cache entry found
wpa_supplicant[37401]: wlan0: RSN: using IEEE 802.11i/D9.0
wpa_supplicant[37401]: wlan0: WPA: Selected cipher suites: group 16
pairwise 16 key_mgmt 128 proto 2
wpa_supplicant[37401]: wlan0: WPA: Selected mgmt group cipher 32
wpa_supplicant[37401]: wlan0: WPA: clearing AP WPA IE
wpa_supplicant[37401]: WPA: set AP RSN IE - hexdump(len=22): [...]
wpa_supplicant[37401]: wlan0: WPA: clearing AP RSNXE
wpa_supplicant[37401]: wlan0: WPA: AP group 0x10 network profile group
0x10; available group 0x10
wpa_supplicant[37401]: wlan0: WPA: using GTK CCMP
wpa_supplicant[37401]: wlan0: WPA: AP pairwise 0x10 network profile
pairwise 0x10; available pairwise 0x10
wpa_supplicant[37401]: wlan0: WPA: using PTK CCMP
wpa_supplicant[37401]: wlan0: WPA: AP key_mgmt 0x80 network profile
key_mgmt 0x80; available key_mgmt 0x80
wpa_supplicant[37401]: wlan0: WPA: using KEY_MGMT 802.1X with SHA256
wpa_supplicant[37401]: wlan0: WPA: AP mgmt_group_cipher 0x20 network
profile mgmt_group_cipher 0x0; available mgmt_group_cipher 0x20
wpa_supplicant[37401]: wlan0: WPA: using MGMT group cipher AES-128-CMAC
wpa_supplicant[37401]: WPA: Set own WPA IE default - hexdump(len=28):
[...]
wpa_supplicant[37401]: RSN: Set own RSNXE default - hexdump(len=0):
wpa_supplicant[37401]: WPA: No current PMKSA - clear PMK
wpa_supplicant[37401]: wlan0: Automatic auth_alg selection: 0x1
wpa_supplicant[37401]: No supported operating classes IE to add
wpa_supplicant[37401]: wlan0: Trying to associate with [...]
wpa_supplicant[37401]: wlan0: Cancelling scan request
wpa_supplicant[37401]: wlan0: State: SCANNING -> ASSOCIATING
wpa_supplicant[37401]: Limit connection to BSSID ... based on scan
results (bssid_set=0 wps=0)
wpa_supplicant[37401]: wpa_driver_bsd_associate: ssid '....' wpa ie len
28 pairwise 16 group 16 key mgmt 128
wpa_supplicant[37401]: bsd_set_opt_ie: set WPA+RSN ie (len 28)
......
wpa_supplicant[37401]: wlan0: RSN: RX message 3 of 4-Way Handshake from
**:**:**:**:**:** (ver=3)
wpa_supplicant[37401]: WPA: IE KeyData - hexdump(len=80): [...]
wpa_supplicant[37401]: WPA: RSN IE in EAPOL-Key - hexdump(len=22): [...]
wpa_supplicant[37401]: WPA: GTK in EAPOL-Key - hexdump(len=24):
[REMOVED]
wpa_supplicant[37401]: WPA: IGTK in EAPOL-Key - hexdump(len=30):
[REMOVED]
wpa_supplicant[37401]: wlan0: WPA: Sending EAPOL-Key 4/4
wpa_supplicant[37401]: WPA: Send EAPOL-Key frame to **:**:**:**:**:**
ver=3 mic_len=16 key_mgmt=0x80
wpa_supplicant[37401]: WPA: EAPOL-Key MIC using AES-CMAC
wpa_supplicant[37401]: WPA: KCK - hexdump(len=16): [REMOVED]
wpa_supplicant[37401]: WPA: Derived Key MIC - hexdump(len=16): [...]
wpa_supplicant[37401]: wlan0: WPA: Installing PTK to the driver
wpa_supplicant[37401]: bsd_set_key: alg=3 addr=0x295c6445b570 key_idx=0
set_tx=1 seq_len=6 key_len=16
wpa_supplicant[37401]: Added PTKSA cache entry addr=**:**:**:**:**:**
cipher=16
wpa_supplicant[37401]: EAPOL: External notification - portValid=1
wpa_supplicant[37401]: EAPOL: SUPP_PAE entering state AUTHENTICATED
wpa_supplicant[37401]: EAPOL: Supplicant port status: Authorized
wpa_supplicant[37401]: EAPOL authentication completed - result=SUCCESS
wpa_supplicant[37401]: wlan0: State: 4WAY_HANDSHAKE -> GROUP_HANDSHAKE
wpa_supplicant[37401]: RSN: received GTK in pairwise handshake -
hexdump(len=18): [REMOVED]
wpa_supplicant[37401]: WPA: Group Key - hexdump(len=16): [REMOVED]
wpa_supplicant[37401]: wlan0: WPA: Installing GTK to the driver
(keyidx=1 tx=0 len=16)
wpa_supplicant[37401]: WPA: RSC - hexdump(len=6): 00 00 00 00 00 00
wpa_supplicant[37401]: bsd_set_key: alg=3 addr=0x218b29318c1b key_idx=1
set_tx=0 seq_len=6 key_len=16
wpa_supplicant[37401]: wlan0: WPA: IGTK keyid 4 pn 000000000000
wpa_supplicant[37401]: WPA: IGTK - hexdump(len=16): [REMOVED]
wpa_supplicant[37401]: bsd_set_key: alg=4 addr=0x218b29318c1b key_idx=4
set_tx=0 seq_len=6 key_len=16
wpa_supplicant[37401]: wlan0: Request to deauthenticate -
bssid=**:**:**:**:**:** pending_bssid=00:00:00:00:00:00 reason=1 (UNSPECIFIED)
state=GROUP_HANDSHAKE valid_links=0x0 ap_mld_addr=00:00:00:00:00:00
wpa_supplicant[37401]: TDLS: Tear down peers
wpa_supplicant[37401]: wlan0: Event DEAUTH (11) received
Not any different if I use a different supplicant from ports ...
Nico
--
Nico Sonack <[email protected]>