[wpa_supplicant]Wifi drops every day after 8h24 (with fixes)

Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.)
Author Message
rboxeur
DD-WRT Novice


Joined: 30 Mar 2020
Posts: 4

PostPosted: Mon Apr 06, 2020 19:15    Post subject: [wpa_supplicant]Wifi drops every day after 8h24 (with fixes) Reply with quote
Content below is for Linux users who met this kind of issue. Not the best solution but I am fine with it. If you used wpa_supplicant directly then it should be more easy for you
I am the owner of a Linksys WRT3200 router.
I have two laptops and both and
Both are
* connected using WPA2-Enterprise + CCMP(AES) to a FreeRadius Server with OpenLDAP at home (EAP-TTLS/PAP)
* are based on Xubuntu 19.10
* managed through Network Manager
Sadly everyday after 8 hours and 24 minutes connection hang with this error
Code:
Rekeying PTK for STA ??:??:??:??:??:?? but driver can't safely do that

I was wondering why???
Since Network Manager is a level over wpa_supplicant, after having a look in his documentation, i found that
Code:
# Maximum lifetime for PMKSA in seconds; default 43200
#dot11RSNAConfigPMKLifetime=43200
# Threshold for reauthentication (percentage of PMK lifetime); default 70
#dot11RSNAConfigPMKReauthThreshold=70

Doing some maths you got 43200*0.7 => 8h24.
I didn't want to replace Network Manager by wpa_supplicant but I was ready to rebuild wpa_supplicant from sources.
To do so,
* I've downloaded its sources
* I used a simple loop to replace 43200 by a higher value
Code:
for file in $(grep -lr 43200 .);do sed -i "s:43200:129600:g" $file;done

* I wrote a simple .config file.Then I replaced my current wpa_supplicant by the new one
I spent 15 days on this issue. To be sure that everything is ok I added some parameters to dd-wrt too for hostapd through the Web Interface (Wireless/Wireless Security)
Code:
tls_session_lifetime=86400
eap_reauth_period=86400
disable_pmksa_caching=0
rsn_preauth=1

To be honest I let it as-it-is. I am not a hostapd expert.
Notice:
If you want more details then you can have a look on a ticket I wrote on my blog
Hoe it helps.
Regards
Sponsor
rboxeur
DD-WRT Novice


Joined: 30 Mar 2020
Posts: 4

PostPosted: Mon Apr 06, 2020 19:29    Post subject: Reply with quote
If you are on Ubuntu and you don't want to build it yourself then you can download this binary based on hostapd repository built today
Download it here
No dependancy required. Tested only on Xubuntu 19.10.
Built using musl-cross-make
I set the value so connection should be up for 1 month (dot11RSNAConfigPMKLifetime = 3826286)
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.) All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum