LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-21-2021, 09:57 PM   #1
pakcjo
LQ Newbie
 
Registered: Oct 2018
Posts: 5

Rep: Reputation: Disabled
Problems with wpa_supplicant and rc.inet1 on Slackware x86_64 -current


Hello,

After the last upgrade to -current I noticed that rc.inet1 fails to start my wireless network. My configuration for rc.inet1.conf is:

Code:
IFNAME[4]="wlan1"
USE_DHCP[4]="yes"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="nl80211"
WLAN_WPAWAIT[4]=120
When rc.inet1 is called with start, I get:

Code:
Starting the network interfaces...
Successfully initialized wpa_supplicant
wlan1: polling for DHCP server
wlan1: waiting for carrier
wlan1: carrier acquired
wlan1: connected to Access Point `MyNetworkAP'
DUID 00:04:35:30:45:35:34:39:33:35:32:30:42:43:ff:ff:ff:ff
wlan1: IAID d5:fd:dc:b6
wlan1: soliciting a DHCP lease
wlan1: offered 192.168.1.185 from 192.168.1.1
wlan1: probing address 192.168.1.185/24
timed out
dhcpcd exited
The /var/log/messages says:

Code:
Mar 21 21:33:07 darkstar rc.inet1[14024]: wlan1: configuring interface
Mar 21 21:33:11 darkstar root: /etc/rc.d/rc.inet1:  wpa_supplicant -B -c/etc/wpa_supplicant.conf -Dnl80211 -iwlan1
Mar 21 21:33:19 darkstar kernel: wlan1: authenticate with 1c:3b:f3:86:be:99
Mar 21 21:33:19 darkstar kernel: wlan1: send auth to 1c:3b:f3:86:be:99 (try 1/3)
Mar 21 21:33:19 darkstar kernel: wlan1: authenticated
Mar 21 21:33:19 darkstar kernel: wlan1: associate with 1c:3b:f3:86:be:99 (try 1/3)
Mar 21 21:33:19 darkstar kernel: wlan1: associate with 1c:3b:f3:86:be:99 (try 2/3)
Mar 21 21:33:19 darkstar kernel: wlan1: RX AssocResp from 1c:3b:f3:86:be:99 (capab=0x411 status=0 aid=2)
Mar 21 21:33:19 darkstar kernel: wlan1: associated
Mar 21 21:33:19 darkstar kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
Mar 21 21:33:19 darkstar kernel: wlan1: deauthenticating from 1c:3b:f3:86:be:99 by local choice (Reason: 3=DEAUTH_LEAVING)
Mar 21 21:33:24 darkstar rc.inet1[14024]: wlan1: starting dhcpcd
Mar 21 21:33:24 darkstar dhcpcd[14191]: wlan1: waiting for carrier
Mar 21 21:33:31 darkstar kernel: wlan1: authenticate with 1c:3b:f3:86:b1:01
Mar 21 21:33:32 darkstar kernel: wlan1: send auth to 1c:3b:f3:86:b1:01 (try 1/3)
Mar 21 21:33:32 darkstar kernel: wlan1: authenticated
Mar 21 21:33:32 darkstar kernel: wlan1: associate with 1c:3b:f3:86:b1:01 (try 1/3)
Mar 21 21:33:32 darkstar kernel: wlan1: associate with 1c:3b:f3:86:b1:01 (try 2/3)
Mar 21 21:33:32 darkstar kernel: wlan1: RX AssocResp from 1c:3b:f3:86:b1:01 (capab=0x411 status=0 aid=3)
Mar 21 21:33:32 darkstar kernel: wlan1: associated
Mar 21 21:33:32 darkstar dhcpcd[14191]: wlan1: carrier acquired
Mar 21 21:33:32 darkstar kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
Mar 21 21:33:32 darkstar dhcpcd[14191]: wlan1: connected to Access Point `MyNetworkAP'
Mar 21 21:33:32 darkstar dhcpcd[14191]: DUID 00:04:35:30:45:35:34:39:33:35:32:30:42:43:ff:ff:ff:ff
Mar 21 21:33:32 darkstar dhcpcd[14191]: wlan1: IAID d5:fd:dc:b6
Mar 21 21:33:33 darkstar dhcpcd[14191]: wlan1: soliciting a DHCP lease
Mar 21 21:33:37 darkstar dhcpcd[14191]: wlan1: offered 192.168.1.185 from 192.168.1.1
Mar 21 21:33:37 darkstar dhcpcd[14191]: wlan1: probing address 192.168.1.185/24
Mar 21 21:33:39 darkstar dhcpcd[14191]: dhcpcd exited
Mar 21 21:33:39 darkstar rc.inet1[14024]: wlan1: failed to obtain DHCP lease
Mar 21 21:33:38 darkstar kernel: wlan1: deauthenticating from 1c:3b:f3:86:b1:01 by local choice (Reason: 3=DEAUTH_LEAVING)
The odd part is that if I just open a terminal and call wpa_supplicant with the exact command as rc.inet1 uses and then call dhclient wlan1 or dhcpcd everything just works...

I'd appreciate any suggestion about this.

Thanks!
 
Old 03-21-2021, 10:17 PM   #2
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,308

Rep: Reputation: 922Reputation: 922Reputation: 922Reputation: 922Reputation: 922Reputation: 922Reputation: 922Reputation: 922
after slackpkg upgrade you do

slackpkg new-config ?
 
Old 03-21-2021, 10:19 PM   #3
kaott
Member
 
Registered: Mar 2020
Posts: 63

Rep: Reputation: Disabled
How are you running dhcpcd or dhclient? Are you giving them a timeout option? From what you posted it looks like it is timing out when trying to get a dhcp lease.

I don't think this changed with the update, and the default should be 15 seconds, but maybe it needs more time.

I think the default timeout interval for dhcpcd is 30 seconds, and 60 seconds for dhclient.

If this doesn't work try setting:
DHCP_DEBUG[4]="yes"
and maybe
DEBUG_ETH_UP="yes"
to see if that helps give more information.
 
1 members found this post helpful.
Old 03-21-2021, 10:35 PM   #4
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,330

Rep: Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579
did your /etc/wpa_supplicant.conf get overwritten?

Last edited by colorpurple21859; 03-21-2021 at 10:37 PM.
 
Old 03-22-2021, 01:14 AM   #5
Mechanikx
Member
 
Registered: Jul 2018
Posts: 350

Rep: Reputation: 258Reputation: 258Reputation: 258
Quote:
Originally Posted by pakcjo View Post
Hello,

After the last upgrade to -current I noticed that rc.inet1 fails to start my wireless network. My configuration for rc.inet1.conf is:

Code:
IFNAME[4]="wlan1"
USE_DHCP[4]="yes"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="nl80211"
WLAN_WPAWAIT[4]=120
When rc.inet1 is called with start, I get:

Code:
Starting the network interfaces...
Successfully initialized wpa_supplicant
wlan1: polling for DHCP server
wlan1: waiting for carrier
wlan1: carrier acquired
wlan1: connected to Access Point `MyNetworkAP'
DUID 00:04:35:30:45:35:34:39:33:35:32:30:42:43:ff:ff:ff:ff
wlan1: IAID d5:fd:dc:b6
wlan1: soliciting a DHCP lease
wlan1: offered 192.168.1.185 from 192.168.1.1
wlan1: probing address 192.168.1.185/24
timed out
dhcpcd exited
The /var/log/messages says:

Code:
Mar 21 21:33:07 darkstar rc.inet1[14024]: wlan1: configuring interface
Mar 21 21:33:11 darkstar root: /etc/rc.d/rc.inet1:  wpa_supplicant -B -c/etc/wpa_supplicant.conf -Dnl80211 -iwlan1
Mar 21 21:33:19 darkstar kernel: wlan1: authenticate with 1c:3b:f3:86:be:99
Mar 21 21:33:19 darkstar kernel: wlan1: send auth to 1c:3b:f3:86:be:99 (try 1/3)
Mar 21 21:33:19 darkstar kernel: wlan1: authenticated
Mar 21 21:33:19 darkstar kernel: wlan1: associate with 1c:3b:f3:86:be:99 (try 1/3)
Mar 21 21:33:19 darkstar kernel: wlan1: associate with 1c:3b:f3:86:be:99 (try 2/3)
Mar 21 21:33:19 darkstar kernel: wlan1: RX AssocResp from 1c:3b:f3:86:be:99 (capab=0x411 status=0 aid=2)
Mar 21 21:33:19 darkstar kernel: wlan1: associated
Mar 21 21:33:19 darkstar kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
Mar 21 21:33:19 darkstar kernel: wlan1: deauthenticating from 1c:3b:f3:86:be:99 by local choice (Reason: 3=DEAUTH_LEAVING)
Mar 21 21:33:24 darkstar rc.inet1[14024]: wlan1: starting dhcpcd
Mar 21 21:33:24 darkstar dhcpcd[14191]: wlan1: waiting for carrier
Mar 21 21:33:31 darkstar kernel: wlan1: authenticate with 1c:3b:f3:86:b1:01
Mar 21 21:33:32 darkstar kernel: wlan1: send auth to 1c:3b:f3:86:b1:01 (try 1/3)
Mar 21 21:33:32 darkstar kernel: wlan1: authenticated
Mar 21 21:33:32 darkstar kernel: wlan1: associate with 1c:3b:f3:86:b1:01 (try 1/3)
Mar 21 21:33:32 darkstar kernel: wlan1: associate with 1c:3b:f3:86:b1:01 (try 2/3)
Mar 21 21:33:32 darkstar kernel: wlan1: RX AssocResp from 1c:3b:f3:86:b1:01 (capab=0x411 status=0 aid=3)
Mar 21 21:33:32 darkstar kernel: wlan1: associated
Mar 21 21:33:32 darkstar dhcpcd[14191]: wlan1: carrier acquired
Mar 21 21:33:32 darkstar kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
Mar 21 21:33:32 darkstar dhcpcd[14191]: wlan1: connected to Access Point `MyNetworkAP'
Mar 21 21:33:32 darkstar dhcpcd[14191]: DUID 00:04:35:30:45:35:34:39:33:35:32:30:42:43:ff:ff:ff:ff
Mar 21 21:33:32 darkstar dhcpcd[14191]: wlan1: IAID d5:fd:dc:b6
Mar 21 21:33:33 darkstar dhcpcd[14191]: wlan1: soliciting a DHCP lease
Mar 21 21:33:37 darkstar dhcpcd[14191]: wlan1: offered 192.168.1.185 from 192.168.1.1
Mar 21 21:33:37 darkstar dhcpcd[14191]: wlan1: probing address 192.168.1.185/24
Mar 21 21:33:39 darkstar dhcpcd[14191]: dhcpcd exited
Mar 21 21:33:39 darkstar rc.inet1[14024]: wlan1: failed to obtain DHCP lease
Mar 21 21:33:38 darkstar kernel: wlan1: deauthenticating from 1c:3b:f3:86:b1:01 by local choice (Reason: 3=DEAUTH_LEAVING)
The odd part is that if I just open a terminal and call wpa_supplicant with the exact command as rc.inet1 uses and then call dhclient wlan1 or dhcpcd everything just works...

I'd appreciate any suggestion about this.

Thanks!
I had the same problem after the update that modified rc.inet1.conf. I checked the diff between the old and the new rc.inet1.conf and ensured it didn't remove any of my settings which it didn't. Not long after that update I lost my connection. So I ran

Code:
/etc/rc.d/rc.inet1 wlan0_restart
and it timed out. I double checked rc.inet1.conf and also checked wpa_supplicant.conf and none of my settings had been overwritten. So I ran it again and this time it worked. I rebooted just to make sure it would stick which it did and it's been fine ever since.

Last edited by Mechanikx; 03-22-2021 at 01:15 AM.
 
Old 03-22-2021, 05:44 AM   #6
tadgy
Member
 
Registered: May 2018
Location: UK
Distribution: Slackware (servers), Void (desktop/laptop)
Posts: 299

Rep: Reputation: 401Reputation: 401Reputation: 401Reputation: 401Reputation: 401
Quote:
Originally Posted by pakcjo View Post
Hello,

After the last upgrade to -current I noticed that rc.inet1 fails to start my wireless network. My configuration for rc.inet1.conf is:

Code:
IFNAME[4]="wlan1"
USE_DHCP[4]="yes"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="nl80211"
WLAN_WPAWAIT[4]=120
This seems fine; though, as suggested by others, you could try increasing the DHCP timeout, for example:
Code:
DHCP_TIMEOUT[4]="120"
Quote:
Originally Posted by pakcjo View Post
Code:
<snip>
wlan1: probing address 192.168.1.185/24
timed out
dhcpcd exited
and

Quote:
Originally Posted by pakcjo View Post
Code:
<snip>
Mar 21 21:33:32 darkstar dhcpcd[14191]: wlan1: connected to Access Point `MyNetworkAP'
Mar 21 21:33:32 darkstar dhcpcd[14191]: DUID 00:04:35:30:45:35:34:39:33:35:32:30:42:43:ff:ff:ff:ff
Mar 21 21:33:32 darkstar dhcpcd[14191]: wlan1: IAID d5:fd:dc:b6
Mar 21 21:33:33 darkstar dhcpcd[14191]: wlan1: soliciting a DHCP lease
Mar 21 21:33:37 darkstar dhcpcd[14191]: wlan1: offered 192.168.1.185 from 192.168.1.1
Mar 21 21:33:37 darkstar dhcpcd[14191]: wlan1: probing address 192.168.1.185/24
Mar 21 21:33:39 darkstar dhcpcd[14191]: dhcpcd exited
Mar 21 21:33:39 darkstar rc.inet1[14024]: wlan1: failed to obtain DHCP lease
Mar 21 21:33:38 darkstar kernel: wlan1: deauthenticating from 1c:3b:f3:86:b1:01 by local choice (Reason: 3=DEAUTH_LEAVING)
both suggest that it is a DHCP timeout causing the failure, rather than rc.inet1 - wpa_supplicant has authenticated to the access point, and DHCP started successfully. dhcpcd then does the IP config, which is where it fails on the second phase of the configuration where it asks the DHCP server to authorise the lease of the IP address offered to it.

Quote:
Originally Posted by pakcjo View Post
The odd part is that if I just open a terminal and call wpa_supplicant with the exact command as rc.inet1 uses and then call dhclient wlan1 or dhcpcd everything just works...
This could indicate that the DHCP server isn't serving the lease fast enough for dhcpcd to obtain it.
The DHCP_TIMEOUT command I suggested above should help with that.

I wouldn't recommend using dhclient as that's not supported by rc.inet1 - dhcpcd is the standard util to configure DHCP on Slackware.
 
1 members found this post helpful.
Old 03-22-2021, 05:50 AM   #7
tadgy
Member
 
Registered: May 2018
Location: UK
Distribution: Slackware (servers), Void (desktop/laptop)
Posts: 299

Rep: Reputation: 401Reputation: 401Reputation: 401Reputation: 401Reputation: 401
Quote:
Originally Posted by kaott View Post
I don't think this changed with the update, and the default should be 15 seconds, but maybe it needs more time.
No, nothing changed with the configuration of wlan interfaces or DHCP changed with the most recent update, so I'm unsure what is causing pakjo's problens...

Quote:
Originally Posted by kaott View Post
I think the default timeout interval for dhcpcd is 30 seconds
The default timeout is overridden by rc.inet1 and set to 15 seconds by default; but can be increased if the DHCP server is a bit slow; which is what I believe is happening here.

Quote:
Originally Posted by kaott View Post
If this doesn't work try setting:
DHCP_DEBUG[4]="yes"
and maybe
DEBUG_ETH_UP="yes"
to see if that helps give more information.
Good suggestion. With DEBUG_ETH_UP set, EVERY command that is run is output to the log, so you'll be able to see exactly how rc.inet1 configured the interface, and what failed where.

Last edited by tadgy; 03-22-2021 at 05:53 AM.
 
Old 03-22-2021, 07:41 AM   #8
pakcjo
LQ Newbie
 
Registered: Oct 2018
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hello, increasing the timeout of the dhcp as Tadgy suggested seems to have solved the issue. I changed both the WLAN_WPAWAIT[4] and DHCP_TIMEOUT[4] to 60.

Thanks to everyone for their time and support!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
duplicate/backup init files - i.e. rc.inet1 and rc.inet1.orig krakanut Slackware 3 08-07-2020 02:45 PM
Modifications to rc.inet1, rc.inet1.conf and rc.wireless hba Slackware 1 12-07-2014 03:57 AM
[Suggestion] How to add parameters to wpa_supplicant and dhcpcd in rc.inet1.conf guanx Slackware 1 08-04-2013 11:33 AM
rc.inet1.conf -- wpa_supplicant with a wired network klapaucius Slackware 3 12-15-2008 12:13 PM
rc.inet1 and rc.inet1.conf edafe Slackware 0 02-16-2005 09:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration