trouble with hostapd

e9hack e9hack at gmail.com
Thu Aug 3 06:34:47 PDT 2023


Am 03.08.2023 um 14:35 schrieb Felix Fietkau:
> thanks for reporting this. Unfortunately I can't reproduce it myself based on your description.
> Can you please let me know what device you are using, and send me the config that reproduces this issue?

I'm using an ASUS RT-AX53U. Hostapd has the radius server compiled in.

 From the boot log related to phy1 (5GHz):

Thu Aug  3 13:43:23 2023 daemon.notice hostapd: Set new config for phy phy1: /var/run/hostapd-phy1.conf
Thu Aug  3 13:43:23 2023 daemon.notice hostapd: Restart interface for phy phy1
Thu Aug  3 13:43:23 2023 daemon.notice hostapd: Configuration file: data: driver=nl80211 logger_syslog=127 logger_syslog_level=4 logger_stdout=127 logger_stdout_level=4 country_code=DE ieee80211d=1 ieee80211h=1 hw_mode=a beacon_int=100 chanlist=36-161 tx_queue_data2_burst=2.0 ieee80211n=1 ht_coex=0 ht_capab=[HT40+][LDPC][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935] ieee80211ac=1 vht_oper_chwidth=1 vht_capab=[RXLDPC][SHORT-GI-80][TX-STBC-2BY1][SU-BEAMFORMER][SU-BEAMFORMEE][MU-BEAMFORMER][MU-BEAMFORMEE][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN][RX-STBC-1][SOUNDING-DIMENSION-2][BF-ANTENNA-2][MAX-MPDU-7991][MAX-A-MPDU-LEN-EXP7] ieee80211ax=1 he_oper_chwidth=1 he_oper_centr_freq_seg0_idx=-6 he_su_beamformer=1 he_su_beamformee=1 he_mu_beamformer=1 he_bss_color=8 he_spr_sr_control=3 he_default_pe_duration=4 he_rts_threshold=1023 he_mu_edca_qos_info_param_count=0 he_mu_edca_qos_info_q_ack=0 he_mu_edca_qos_info_queue_request=0 he_mu_edca_qos_info_txop_request=0 he_mu_edca_ac_be_aifsn=8 he_mu_edca_ac_be_aci=0 he_mu_edca_ac
Thu Aug  3 13:43:23 2023 kern.info kernel: [   59.104093] br-lan: port 3(phy1-ap0) entered blocking state
Thu Aug  3 13:43:23 2023 kern.info kernel: [   59.109914] br-lan: port 3(phy1-ap0) entered disabled state
Thu Aug  3 13:43:23 2023 kern.info kernel: [   59.116238] device phy1-ap0 entered promiscuous mode
Thu Aug  3 13:43:23 2023 kern.info kernel: [   59.121636] br-lan: port 3(phy1-ap0) entered blocking state
Thu Aug  3 13:43:23 2023 kern.info kernel: [   59.127341] br-lan: port 3(phy1-ap0) entered forwarding state
Thu Aug  3 13:43:23 2023 kern.info kernel: [   59.150134] br-lan: port 3(phy1-ap0) entered disabled state
Thu Aug  3 13:43:23 2023 daemon.notice hostapd: phy1-ap0: interface state UNINITIALIZED->COUNTRY_UPDATE
Thu Aug  3 13:43:23 2023 daemon.notice hostapd: ACS: Automatic channel selection started, this may take a bit
Thu Aug  3 13:43:23 2023 daemon.notice hostapd: phy1-ap0: interface state COUNTRY_UPDATE->ACS
Thu Aug  3 13:43:23 2023 daemon.notice hostapd: phy1-ap0: ACS-STARTED
Thu Aug  3 13:43:24 2023 daemon.notice netifd: Wireless device 'radio1' is now up
Thu Aug  3 13:43:33 2023 daemon.notice hostapd: phy1-ap0: INTERFACE-DISABLED
Thu Aug  3 13:43:34 2023 daemon.err hostapd: ACS: Failed to request initial scan
Thu Aug  3 13:43:34 2023 daemon.err hostapd: ACS: Failed to request scan
Thu Aug  3 13:43:34 2023 daemon.err hostapd: Interface initialization failed
Thu Aug  3 13:43:34 2023 daemon.notice hostapd: phy1-ap0: interface state ACS->DISABLED
Thu Aug  3 13:43:34 2023 daemon.notice hostapd: phy1-ap0: AP-DISABLED
Thu Aug  3 13:43:34 2023 daemon.err hostapd: ACS: Failed to start
Thu Aug  3 13:43:34 2023 daemon.notice hostapd: phy1-ap0: AP-DISABLED
Thu Aug  3 13:43:34 2023 daemon.err hostapd: hostapd_free_hapd_data: Interface phy1-ap0 wasn't started
Thu Aug  3 13:43:34 2023 daemon.err hostapd: hostapd_free_hapd_data: Interface phy1-ap1 wasn't started
Thu Aug  3 13:43:34 2023 daemon.err hostapd: hostapd_free_hapd_data: Interface phy1-ap2 wasn't started
Thu Aug  3 13:43:34 2023 daemon.notice hostapd: nl80211: deinit ifname=phy1-ap0 disabled_11b_rates=0
Thu Aug  3 13:43:34 2023 daemon.notice hostapd: nl80211: Failed to remove interface phy1-ap0 from bridge br-lan: No such device
Thu Aug  3 13:43:34 2023 daemon.err hostapd: Could not read interface phy1-ap0 flags: No such device
Thu Aug  3 13:43:34 2023 daemon.notice hostapd: phy1-ap0: interface state DISABLED->DISABLED


 From 'wifi reload' after setting 'option wpa_group_rekey 3601' :

Thu Aug  3 15:09:19 2023 daemon.notice hostapd: Set new config for phy phy1: /var/run/hostapd-phy1.conf
Thu Aug  3 15:09:19 2023 daemon.notice hostapd: Reload config for bss 'phy1-ap0' on phy 'phy1'
Thu Aug  3 15:09:20 2023 daemon.notice hostapd: bss 'phy1-ap1' not found
Thu Aug  3 15:09:20 2023 daemon.notice hostapd: Restart interface for phy phy1
Thu Aug  3 15:09:20 2023 daemon.notice hostapd: Remove interface 'phy1-ap0'
Thu Aug  3 15:09:20 2023 daemon.notice hostapd: phy1-ap0: interface state DISABLED->DISABLED
Thu Aug  3 15:09:20 2023 daemon.notice hostapd: phy1-ap2: AP-DISABLED
Thu Aug  3 15:09:20 2023 daemon.notice hostapd: phy1-ap2: CTRL-EVENT-TERMINATING
Thu Aug  3 15:09:25 2023 daemon.notice hostapd: Configuration file: data: driver=nl80211 logger_syslog=127 logger_syslog_level=4 logger_stdout=127 logger_stdout_level=4 country_code=DE ieee80211d=1 ieee80211h=1 hw_mode=a beacon_int=100 chanlist=36-161 tx_queue_data2_burst=2.0 ieee80211n=1 ht_coex=0 ht_capab=[HT40+][LDPC][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935] ieee80211ac=1 vht_oper_chwidth=1 vht_capab=[RXLDPC][SHORT-GI-80][TX-STBC-2BY1][SU-BEAMFORMER][SU-BEAMFORMEE][MU-BEAMFORMER][MU-BEAMFORMEE][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN][RX-STBC-1][SOUNDING-DIMENSION-2][BF-ANTENNA-2][MAX-MPDU-7991][MAX-A-MPDU-LEN-EXP7] ieee80211ax=1 he_oper_chwidth=1 he_oper_centr_freq_seg0_idx=-6 he_su_beamformer=1 he_su_beamformee=1 he_mu_beamformer=1 he_bss_color=8 he_spr_sr_control=3 he_default_pe_duration=4 he_rts_threshold=1023 he_mu_edca_qos_info_param_count=0 he_mu_edca_qos_info_q_ack=0 he_mu_edca_qos_info_queue_request=0 he_mu_edca_qos_info_txop_request=0 he_mu_edca_ac_be_aifsn=8 he_mu_edca_ac_be_aci=0 he_mu_edca_ac
Thu Aug  3 15:09:25 2023 kern.info kernel: [ 1146.386684] br-lan: port 3(phy1-ap0) entered blocking state
Thu Aug  3 15:09:25 2023 kern.info kernel: [ 1146.392622] br-lan: port 3(phy1-ap0) entered disabled state
Thu Aug  3 15:09:25 2023 kern.info kernel: [ 1146.399263] device phy1-ap0 entered promiscuous mode
Thu Aug  3 15:09:25 2023 kern.info kernel: [ 1146.404970] br-lan: port 3(phy1-ap0) entered blocking state
Thu Aug  3 15:09:25 2023 kern.info kernel: [ 1146.410703] br-lan: port 3(phy1-ap0) entered forwarding state
Thu Aug  3 15:09:25 2023 daemon.notice hostapd: phy1-ap0: interface state UNINITIALIZED->COUNTRY_UPDATE
Thu Aug  3 15:09:25 2023 daemon.notice hostapd: ACS: Automatic channel selection started, this may take a bit
Thu Aug  3 15:09:25 2023 daemon.notice hostapd: phy1-ap0: interface state COUNTRY_UPDATE->ACS
Thu Aug  3 15:09:25 2023 daemon.notice hostapd: phy1-ap0: ACS-STARTED
Thu Aug  3 15:09:25 2023 daemon.notice netifd: Wireless device 'radio1' is now up
Thu Aug  3 15:09:25 2023 kern.info kernel: [ 1147.000861] br-lan: port 3(phy1-ap0) entered disabled state
Thu Aug  3 15:09:40 2023 daemon.notice hostapd: ACS: Survey for freq 5180 is missing noise floor
Thu Aug  3 15:09:40 2023 daemon.notice hostapd: ACS: Survey for freq 5200 is missing noise floor
-- snip --
Thu Aug  3 15:09:40 2023 daemon.notice hostapd: ACS: Survey for freq 5745 is missing noise floor
Thu Aug  3 15:09:40 2023 daemon.notice hostapd: phy1-ap0: ACS-COMPLETED freq=5660 channel=132
Thu Aug  3 15:09:40 2023 daemon.notice hostapd: phy1-ap0: interface state ACS->HT_SCAN
Thu Aug  3 15:09:40 2023 daemon.notice hostapd: phy1-ap0: interface state HT_SCAN->DFS
Thu Aug  3 15:09:40 2023 daemon.notice hostapd: phy1-ap0: DFS-CAC-START freq=5660 chan=132 sec_chan=1, width=1, seg0=138, seg1=0, cac_time=60s
Thu Aug  3 15:10:45 2023 daemon.notice hostapd: phy1-ap0: DFS-CAC-COMPLETED success=1 freq=5660 ht_enabled=0 chan_offset=0 chan_width=3 cf1=5690 cf2=0
Thu Aug  3 15:10:46 2023 daemon.notice netifd: Network device 'phy1-ap0' link is up
Thu Aug  3 15:10:47 2023 kern.info kernel: [ 1228.264926] br-lan: port 4(phy1-ap1) entered blocking state
Thu Aug  3 15:10:47 2023 kern.info kernel: [ 1228.270666] br-lan: port 4(phy1-ap1) entered disabled state
Thu Aug  3 15:10:47 2023 kern.info kernel: [ 1228.277114] device phy1-ap1 entered promiscuous mode
Thu Aug  3 15:10:47 2023 kern.info kernel: [ 1228.287004] br-lan: port 4(phy1-ap1) entered blocking state
Thu Aug  3 15:10:47 2023 kern.info kernel: [ 1228.292762] br-lan: port 4(phy1-ap1) entered forwarding state
Thu Aug  3 15:10:47 2023 daemon.notice hostapd: Enabled CRL reload functionality
Thu Aug  3 15:10:47 2023 kern.info kernel: [ 1228.313299] IPv6: ADDRCONF(NETDEV_CHANGE): phy1-ap1: link becomes ready
Thu Aug  3 15:10:47 2023 daemon.notice netifd: Network device 'phy1-ap1' link is up
Thu Aug  3 15:10:47 2023 kern.info kernel: [ 1228.446015] br-tor: port 1(phy1-ap2) entered blocking state
Thu Aug  3 15:10:47 2023 kern.info kernel: [ 1228.451711] br-tor: port 1(phy1-ap2) entered disabled state
Thu Aug  3 15:10:47 2023 kern.info kernel: [ 1228.457752] device phy1-ap2 entered promiscuous mode
Thu Aug  3 15:10:47 2023 kern.info kernel: [ 1228.470033] br-tor: port 1(phy1-ap2) entered blocking state
Thu Aug  3 15:10:47 2023 kern.info kernel: [ 1228.475716] br-tor: port 1(phy1-ap2) entered forwarding state


 From 'wifi down; sleep 30; wifi' after removeing 'option channel auto'/'option channels 36-161' and 'setting option channel 52':

Thu Aug  3 15:19:30 2023 daemon.notice hostapd: Set new config for phy phy1: /var/run/hostapd-phy1.conf
Thu Aug  3 15:19:30 2023 daemon.notice hostapd: Restart interface for phy phy1
Thu Aug  3 15:19:30 2023 kern.info kernel: [ 1751.881154] br-lan: port 3(phy1-ap0) entered blocking state
Thu Aug  3 15:19:30 2023 kern.info kernel: [ 1751.886797] br-lan: port 3(phy1-ap0) entered disabled state
Thu Aug  3 15:19:30 2023 kern.info kernel: [ 1751.893245] device phy1-ap0 entered promiscuous mode
Thu Aug  3 15:19:30 2023 daemon.notice hostapd: Configuration file: data: driver=nl80211 logger_syslog=127 logger_syslog_level=4 logger_stdout=127 logger_stdout_level=4 country_code=DE ieee80211d=1 ieee80211h=1 hw_mode=a beacon_int=100 chanlist=52 tx_queue_data2_burst=2.0 ieee80211n=1 ht_coex=0 ht_capab=[HT40+][LDPC][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935] ieee80211ac=1 vht_oper_chwidth=1 vht_oper_centr_freq_seg0_idx=58 vht_capab=[RXLDPC][SHORT-GI-80][TX-STBC-2BY1][SU-BEAMFORMER][SU-BEAMFORMEE][MU-BEAMFORMER][MU-BEAMFORMEE][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN][RX-STBC-1][SOUNDING-DIMENSION-2][BF-ANTENNA-2][MAX-MPDU-7991][MAX-A-MPDU-LEN-EXP7] ieee80211ax=1 he_oper_chwidth=1 he_oper_centr_freq_seg0_idx=58 he_su_beamformer=1 he_su_beamformee=1 he_mu_beamformer=1 he_bss_color=8 he_spr_sr_control=3 he_default_pe_duration=4 he_rts_threshold=1023 he_mu_edca_qos_info_param_count=0 he_mu_edca_qos_info_q_ack=0 he_mu_edca_qos_info_queue_request=0 he_mu_edca_qos_info_txop_request=0 he_mu_edca_ac_be_aifsn=8 he_mu_ed
Thu Aug  3 15:19:30 2023 kern.info kernel: [ 1751.954942] br-lan: port 3(phy1-ap0) entered blocking state
Thu Aug  3 15:19:30 2023 kern.info kernel: [ 1751.960717] br-lan: port 3(phy1-ap0) entered forwarding state
Thu Aug  3 15:19:30 2023 kern.info kernel: [ 1751.972245] br-lan: port 3(phy1-ap0) entered disabled state
Thu Aug  3 15:19:30 2023 daemon.notice hostapd: phy1-ap0: interface state UNINITIALIZED->COUNTRY_UPDATE
Thu Aug  3 15:19:30 2023 daemon.notice hostapd: phy1-ap0: interface state COUNTRY_UPDATE->HT_SCAN
Thu Aug  3 15:19:31 2023 daemon.notice netifd: Wireless device 'radio1' is now up
Thu Aug  3 15:19:31 2023 daemon.notice hostapd: phy1-ap0: interface state HT_SCAN->DFS
Thu Aug  3 15:19:31 2023 daemon.notice hostapd: phy1-ap0: DFS-CAC-START freq=5260 chan=52 sec_chan=1, width=1, seg0=58, seg1=0, cac_time=60s
Thu Aug  3 15:19:36 2023 daemon.notice hostapd: phy1-ap0: DFS-CAC-COMPLETED success=0 freq=5260 ht_enabled=0 chan_offset=0 chan_width=3 cf1=5290 cf2=0
Thu Aug  3 15:19:36 2023 daemon.notice hostapd: phy1-ap0: INTERFACE-DISABLED
Thu Aug  3 15:19:36 2023 kern.info kernel: [ 1758.059678] br-lan: port 3(phy1-ap0) entered disabled state
Thu Aug  3 15:19:36 2023 kern.info kernel: [ 1758.128795] device phy1-ap0 left promiscuous mode
Thu Aug  3 15:19:36 2023 kern.info kernel: [ 1758.133579] br-lan: port 3(phy1-ap0) entered disabled state


WiFi configuration:

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option htmode 'HE40'
	option country 'DE'
	option noscan '1'
	option log_level '4'
	option ht_coex '1'
	option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0'
	option band '2g'
	option disabled '0'

config wifi-iface 'wifinet0'
	option device 'radio0'
	option mode 'ap'
	option network 'lan'
	option encryption 'wpa3-mixed'
	option ssid 'WLAN-DSL-radius'
	option ca_cert '/etc/certs/my_ca.crt'
	option crl_file '/etc/certs/crl-current.pem'
	option check_crl '2'
	option server_cert '/etc/certs/my_server.crt'
	option private_key '/etc/certs/my_server.key'
	option private_key_passwd 'secret'
	option dh_file '/etc/certs/hostapd.dh4096.pem'
	option eap_user_file '/etc/config/haprad.eap_user'
	option server_id 'wlan-dsl.xxxx.yyy'
	option eapol_version '2'
	option ieee80211w '1'
	option eap_server '1'

-- snip --

config wifi-device 'radio1'
	option type 'mac80211'
	option channel 'auto'
	option channels '36-161'
	option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0+1'
	option htmode 'HE80'
	option country 'DE'
	option disassoc_low_ack '0'
	option log_level '4'
	option band '5g'
	option disabled '0'
	option he_su_beamformee '1'
	option he_bss_color '8'
	option hwmode '11a'

-- snip --

config wifi-iface 'wifinet8'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid 'WLAN-DSL'
	option encryption 'sae-mixed'
	option wpa_psk_file '/etc/config/hostapd.wpa_psk'
	option disassoc_low_ack '0'
	option ieee80211w '1'
	option wpa_group_rekey '3600'
	option eap_reauth_period '0'
	option sae_password 'secret'

-- snip --


Regards,
Hartmut



More information about the openwrt-devel mailing list