Estou tentando forçar minha conexão com um bssid específico dentro de um grupo ssid. Temos vários APs que transmitem o mesmo SSID, mas eu preciso selecionar um específico para se conectar.
Parece que isso deve ser feito usando o bssid_whitelist (e definindo que o APA "preferido" do bssid não deve ser prejudicado). O problema é que parece que isso é ignorado durante a fase de associação.
Basicamente, eu preciso saber por que isso não está funcionando; estou faltando alguma coisa ou há algo quebrado no meu sistema.
Aqui está uma transcrição da minha sessão wpa_cli através da fase de associação (o nome de usuário / senha são imateriais, pois esse problema surge antes da fase de autenticação do usuário):
> log_level EXCESSIVE 1
OK
> add_network
0
> set_network 0 password "junk"
OK
> set_network 0 phase2 "auth=MSCHAPV2"
OK
> set_network 0 ssid "wave"
OK
> set_network 0 bssid 50:0f:80:6d:f2:de
OK
> set_network 0 proto RSN
OK
> set_network 0 auth_alg OPEN
OK
> set_network 0 bssid_whitelist 50:0f:80:6d:f2:de/ff:ff:ff:ff:ff:ff
OK
> set_network 0 pairwise CCMP
OK
> set_network 0 eap PEAP
OK
> set_network 0 key_mgmt WPA-EAP
OK
> set_network 0 identity "nobody"
OK
> select_network 0
OK
>
<3>Trying to associate with 50:0f:80:6d:f2:de (SSID='wave' freq=5320 MHz)
>
<3>Associated with 38:90:a5:63:65:4e
>
Acredito que o BSSID solicitado foi substituído por um driver de camada inferior. O que eu não entendo é porque o bssid_whitelist é ignorado. Se eu olhar para o arquivo de log do wpa_supplicant, ele mostrará o nl80211 retornando um bssid diferente daquele que foi solicitado. Aqui está um trecho do log do wpa_supplicant da solicitação de associação para a resposta:
1512057559.873204: wlan0: Trying to associate with 50:0f:80:6d:f2:de (SSID='wave' freq=5320 MHz)
1512057559.873280: CTRL_IFACE monitor sent successfully to /tmp/wpa_ctrl_21357-2\x00
1512057559.873294: FT: Stored MDIE and FTIE from (Re)Association Response - hexdump(len=0):
1512057559.873305: wlan0: Cancelling scan request
1512057559.873317: wlan0: WPA: clearing own WPA/RSN IE
1512057559.873327: wlan0: Automatic auth_alg selection: 0x1
1512057559.873338: wlan0: Overriding auth_alg selection: 0x1
1512057559.873347: RSN: PMKSA cache search - network_ctx=0x555b910180 try_opportunistic=0
1512057559.873355: RSN: Search for BSSID 50:0f:80:6d:f2:de
1512057559.873365: RSN: No PMKSA cache entry found
1512057559.873375: wlan0: RSN: using IEEE 802.11i/D9.0
1512057559.873388: wlan0: WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 1 proto 2
1512057559.873399: wlan0: WPA: Selected mgmt group cipher 32
1512057559.873409: wlan0: WPA: clearing AP WPA IE
1512057559.873418: WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 01 28 00
1512057559.873440: wlan0: WPA: using GTK CCMP
1512057559.873450: wlan0: WPA: using PTK CCMP
1512057559.873460: wlan0: WPA: using KEY_MGMT 802.1X
1512057559.873470: wlan0: WPA: not using MGMT group cipher
1512057559.873480: WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 01 00 00
1512057559.873510: wlan0: State: SCANNING -> ASSOCIATING
1512057559.873539: nl80211: Set wlan0 operstate 0->0 (DORMANT)
1512057559.873550: netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
1512057559.873586: Limit connection to BSSID 50:0f:80:6d:f2:de freq=5320 MHz based on scan results (bssid_set=1)
1512057559.873601: wlan0: set_disable_max_amsdu: -1
1512057559.873612: wlan0: set_ampdu_factor: -1
1512057559.873622: wlan0: set_ampdu_density: -1
1512057559.873633: wlan0: set_disable_ht40: 0
1512057559.873643: wlan0: set_disable_sgi: 0
1512057559.873652: wlan0: set_disable_ldpc: 0
1512057559.873665: wlan0: Determining shared radio frequencies (max len 1)
1512057559.873676: wlan0: Shared frequencies (len=0): completed iteration
1512057559.873687: nl80211: Set mode ifindex 3 iftype 2 (STATION)
1512057559.873745: nl80211: Unsubscribe mgmt frames handle 0x888888ddd306f999 (mode change)
1512057559.873841: nl80211: Subscribe to mgmt frames with non-AP handle 0x555b8e7110
1512057559.873854: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x555b8e7110 match=040a
1512057559.873895: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x555b8e7110 match=040b
1512057559.873926: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x555b8e7110 match=040c
1512057559.873955: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x555b8e7110 match=040d
1512057559.873985: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x555b8e7110 match=090a
1512057559.874014: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x555b8e7110 match=090b
1512057559.874044: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x555b8e7110 match=090c
1512057559.874075: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x555b8e7110 match=090d
1512057559.874105: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x555b8e7110 match=0409506f9a09
1512057559.874136: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x555b8e7110 match=7f506f9a09
1512057559.874165: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x555b8e7110 match=0801
1512057559.874194: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x555b8e7110 match=06
1512057559.874223: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x555b8e7110 match=0a07
1512057559.874253: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x555b8e7110 match=0a11
1512057559.874281: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x555b8e7110 match=1101
1512057559.874310: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x555b8e7110 match=1102
1512057559.874340: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x555b8e7110 match=0505
1512057559.874376: nl80211: Connect (ifindex=3)
1512057559.874388: * bssid=50:0f:80:6d:f2:de
1512057559.874398: * bssid_hint=50:0f:80:6d:f2:de
1512057559.874407: * freq=5320
1512057559.874414: * freq_hint=5320
1512057559.874422: * SSID - hexdump_ascii(len=4):
77 61 76 65 wave
1512057559.874441: * IEs - hexdump(len=28): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 01 00 00 7f 04 00 00 0a 02
1512057559.874464: * WPA Versions 0x2
1512057559.874472: * pairwise=0xfac04
1512057559.874479: * group=0xfac04
1512057559.874486: * akm=0xfac01
1512057559.874494: * htcaps - hexdump(len=26): 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1512057559.874515: * htcaps_mask - hexdump(len=26): 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1512057559.874537: * vhtcaps - hexdump(len=12): 00 00 00 00 00 00 00 00 00 00 00 00
1512057559.874550: * vhtcaps_mask - hexdump(len=12): 00 00 00 00 00 00 00 00 00 00 00 00
1512057559.874564: * Auth Type 0
1512057559.874985: nl80211: Connect request send successfully
1512057559.875001: wlan0: Setting authentication timeout: 10 sec 0 usec
1512057559.875015: EAPOL: External notification - EAP success=0
1512057559.875052: EAPOL: External notification - EAP fail=0
1512057559.875061: EAPOL: External notification - portControl=Auto
1512057559.888799: wlan0: Control interface command 'PING'
1512057560.172574: nl80211: Event message available
1512057560.172649: nl80211: Drv Event 46 (NL80211_CMD_CONNECT) received for wlan0
1512057560.172664: nl80211: Connect event (status=0 ignore_next_local_disconnect=1)
1512057560.172783: nl80211: Associated on 5240 MHz
1512057560.172795: nl80211: Associated with 38:90:a5:63:65:4e
1512057560.172871: nl80211: Operating frequency for the associated BSS from scan results: 5240 MHz
1512057560.172889: wlan0: Event ASSOC (0) received
1512057560.172904: wlan0: Association info event
Alguns detalhes:
Tags wpa-supplicant linux wpa-cli