[SOLVED] LEDE 17.01.4 wi-fi not starting (hostapd unknown configuration wpa_disable_eapol_key_retries)

Possibly similar to this topic, but in this one I'll try to provide the relevant information for troubleshooting.

I recently updated my TP-Link TD-W8980 to LEDE 17.01.4 (target: Lantiq/xrx200):

[root@td-w8980:~] cat /etc/openwrt_release; uname -a
DISTRIB_ID='LEDE'
DISTRIB_RELEASE='17.01.4'
DISTRIB_REVISION='r3560-79f57e422d'
DISTRIB_CODENAME='reboot'
DISTRIB_TARGET='lantiq/xrx200'
DISTRIB_ARCH='mips_24kc'
DISTRIB_DESCRIPTION='LEDE Reboot 17.01.4 r3560-79f57e422d'
DISTRIB_TAINTS='no-all'
Linux td-w8980 4.4.92 #0 Tue Oct 17 17:46:20 2017 mips GNU/Linux

I have restored all the additional packages I had installed in 17.3 and all of them are up-to-date.

[root@td-w8980:~] opkg list-upgradable
[root@td-w8980:~]

I also restored all the configurations from the previous release.

However, when I try to start the wi-fi interface, it always fails and the following events appear in logread:

Sat Oct 28 11:09:40 2017 daemon.err hostapd: Configuration file: /var/run/hostapd-phy0.conf
Sat Oct 28 11:09:40 2017 daemon.err hostapd: Line 31: unknown configuration item 'wpa_disable_eapol_key_retries'
Sat Oct 28 11:09:40 2017 daemon.err hostapd: 1 error found in configuration file '/var/run/hostapd-phy0.conf'
Sat Oct 28 11:09:40 2017 daemon.err hostapd: Failed to set up interface with /var/run/hostapd-phy0.conf
Sat Oct 28 11:09:40 2017 daemon.err hostapd: Failed to initialize interface

Searching for the wpa_disable_eapol_key_retries setting, I found out it has been introduced in 17.04.1 in relation to the CRACK vulnerability to improve security of the AP clients that cannot be updated. The setting appears the hostapd configuration file:

[root@td-w8980:~] grep wpa_disable_eapol_key_retries /var/run/hostapd-phy0.conf
wpa_disable_eapol_key_retries=0

I removed the setting from both that file and /etc/config/wireless, but when i restart the wi-fi the setting is automatically added back into the first configuration file and I am back to issue above described: unknown configuration item 'wpa_disable_eapol_key_retries_ and Failed to initialize interface

The issue seems to have something do with this patch introduced in the new LEDE release, however despite the configuration file has the new wpa_disable_eapol_key_retries configuration, my hostapd daemon does not seem to be able to handle it and therefore fails to start.

The version of hostapd I have is from December 2016:

[root@td-w8980:~] /usr/sbin/hostapd -v
hostapd v2.7-devel
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2016, Jouni Malinen j @w1.fi and contributors

And that version is in line with the latest hostapd-common and wapd-mini packages available in the LEDE 17.01 packages list for my device:

[root@td-w8980:~] opkg list-installed wpad-mini; opkg list wpad-mini
wpad-mini - 2016-12-19-ad02e79d-6
wpad-mini - 2016-12-19-ad02e79d-6
[root@td-w8980:~] opkg list-installed hostapd-common; opkg list hostapd-common
hostapd-common - 2016-12-19-ad02e79d-6
hostapd-common - 2016-12-19-ad02e79d-6

Up to LEDE 17.01.3 my wi-fi configuration was working OK and I have not touched it. I also have restored exactly the same packages I used to have with the previous version.

I checked LEDE 17.01.4 release notes as well as wireless configuration Wiki without finding anything of use (yes, the new setting is mentioned but no matter if I set it to 0 or 1 or I remove it from /etc/config/wireless I have hostatpd complaining and not starting).

Is there anything I should install or change in my setup because of the newly introduced wpa_disable_eapol_key_retries setting?

Is there anything wrong with LEDE 17.01.4 for Lantiq/xrx200 (TP-Link TD-W8980) and wi-fi?

What is the package that has been changed by the aforementioned patch introducing wpa_disable_eapol_key_retries, if it is not hostapd-common nor wapd-mini?

Thanks in advance to whoever will provide help.
Ayeye

Without going into long story
I will recommend fresh install with fresh configuration, also I will point out packages wapd-mini and wapd read description of the packages.

I am not solving your problem, but suggestion, or unintentionally creating more problem.

Just a hunch:
you might test if changing to full "wpad" would help

opkg update
opkg remove wpad-mini
opkg install wpad

(assuming that you wired connectivity. otherwise, you might need to first manually download the wpad package)

It might be that the option is only recognised with the full version. (But if that would be the case, I assume that many other users should have already ran into this problem.) It is likely some

Hmmm... believe it or not, I removed and reinstalled the relevant package and dependencies and after a reboot it all started to work again.

Here's what I have done:

[root@td-w8980:~] opkg remove hostapd-common wpad-mini
Removing package wpad-mini from root...
Collected errors:

  • print_dependents_warning: Package hostapd-common is depended upon by packages:
  • print_dependents_warning: wpad-mini
  • print_dependents_warning: kmod-mac80211
  • print_dependents_warning: These might cease to work if package hostapd-common is removed.
  • print_dependents_warning: Force removal of this package with --force-depends.
  • print_dependents_warning: Force removal of this package and its dependents
  • print_dependents_warning: with --force-removal-of-dependent-packages.

Ok, there were some dependencies, let's remove them as well:

[root@td-w8980:~] opkg remove hostapd-common wpad-mini --force-removal-of-dependent-packages
Removing package kmod-ath9k from root...
Removing package kmod-ath9k-common from root...
Removing package kmod-ath from root...
Removing package kmod-mac80211 from root...
Removing package hostapd-common from root...

Let's reinstall all the removed packages now:

[root@td-w8980:~] opkg install kmod-ath9k kmod-ath9k-common kmod-ath kmod-mac80211 hostapd-common wpad-mini
Installing kmod-ath9k (4.4.92+2017-01-31-3) to root...
Downloading http://downloads.lede-project.org/releases/17.01.4/targets/lantiq/xrx200/packages/kmod-ath9k_4.4.92+2017-01-31-3_mips_24kc.ipk
[...]
Configuring hostapd-common.
Configuring kmod-mac80211.
Configuring kmod-ath.
Configuring kmod-ath9k-common.
Configuring kmod-ath9k.
Configuring wpad-mini.

Issued a restart, to make sure radio devices were detected at boot:

[root@td-w8980:/etc/config] reboot

After reboot, I made sure the interface was enabled

[root@td-w8980:~] uci set wireless.@wifi-device[0].disabled=0; uci commit wireless; wifi!

...and bang! It worked. :slight_smile:

Thanks to all who provided suggestions, hope my troubleshooting will be of help for others running into the same issue.

1 Like

in my case that issue has happened only because i used sysupgrade (not factory) variant after chaos-calmer