LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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-09-2021, 08:29 AM   #106
davjohn
Member
 
Registered: Jan 2017
Posts: 94

Rep: Reputation: Disabled

Quote:
Originally Posted by tadgy View Post
Can you test it with a reboot?
I mean, set it to 'yes', then reboot and then see if it comes up OK... I suspect it will, in which case I don't think it's anything to worry about - I don't think (most) people are going to fuzz with that option too much; it'll be a case of turn it on and forget.
It was rebooted multiple times.
I see what the problem is. It's the same problem with interface already up, rc.wireless brings interface up.
Not sure what is the solution for this. Bring it down if it's up, just before it is brought up again? But it doesn't feel very "clean".
 
Old 03-09-2021, 09:44 AM   #107
tadgy
Member
 
Registered: May 2018
Location: UK
Distribution: Slackware (servers), Void (desktop/laptop)
Posts: 299

Original Poster
Rep: Reputation: 401Reputation: 401Reputation: 401Reputation: 401Reputation: 401
Quote:
Originally Posted by davjohn View Post
It was rebooted multiple times.
I see what the problem is. It's the same problem with interface already up, rc.wireless brings interface up.
Not sure what is the solution for this. Bring it down if it's up, just before it is brought up again? But it doesn't feel very "clean".
Are you using NetworkManager for your wireless? Or setting things up in wpa_supplicant.conf?

If you're using NetworkManager, setting the interface up in rc.inet1 isn't supported anyway - it should be up to NM to set up the interface correctly (and if it doesn't support the security enhancements, then that would seem to be an issue with NM...).

If it's the latter, we can just not leave the interface in an up state at the end of rc.wireless....
 
Old 03-09-2021, 10:10 AM   #108
davjohn
Member
 
Registered: Jan 2017
Posts: 94

Rep: Reputation: Disabled
Quote:
Originally Posted by tadgy View Post
Are you using NetworkManager for your wireless? Or setting things up in wpa_supplicant.conf?

If you're using NetworkManager, setting the interface up in rc.inet1 isn't supported anyway - it should be up to NM to set up the interface correctly (and if it doesn't support the security enhancements, then that would seem to be an issue with NM...).

If it's the latter, we can just not leave the interface in an up state at the end of rc.wireless....
No, I'm not using NetworkManager on this laptop. I'm setting things up in wpa_supplicant.conf.
NetworkManager actually works without problem.
 
Old 03-09-2021, 11:14 AM   #109
tadgy
Member
 
Registered: May 2018
Location: UK
Distribution: Slackware (servers), Void (desktop/laptop)
Posts: 299

Original Poster
Rep: Reputation: 401Reputation: 401Reputation: 401Reputation: 401Reputation: 401
Quote:
Originally Posted by davjohn View Post
No, I'm not using NetworkManager on this laptop. I'm setting things up in wpa_supplicant.conf.
NetworkManager actually works without problem.
I've just added a new branch 'tadgy' to the slacknetsetup git repo - try using the rc.wireless from that and give it a test. Note: it's not the usual 'master' branch as I didn't want to push this to master until we know it fixes the problem.

Fingers crossed!
 
Old 03-09-2021, 11:53 AM   #110
davjohn
Member
 
Registered: Jan 2017
Posts: 94

Rep: Reputation: Disabled
Quote:
Originally Posted by tadgy View Post
I've just added a new branch 'tadgy' to the slacknetsetup git repo - try using the rc.wireless from that and give it a test. Note: it's not the usual 'master' branch as I didn't want to push this to master until we know it fixes the problem.

Fingers crossed!
Well, it seems wpa_supplicant or something still brings interface up.

But with patch bellow it works

Code:
diff --git a/rc.wireless b/rc.wireless
index 00df8c3..9eaf0fa 100644
--- a/rc.wireless
+++ b/rc.wireless
@@ -343,7 +343,7 @@ else
          echo "$0:  $IWCOMMAND essid \"$ESSID\"" | $LOGGER
          $IWCOMMAND essid "$ESSID"
        fi
-        # Tadgy: don't leave interface up as this causes problems for SLAAC in rc.inet1
-        $IFCOMMAND down
-        sleep 3
 fi
+# Tadgy: don't leave interface up as this causes problems for SLAAC in rc.inet1
+$IFCOMMAND down
+sleep 3
I was worried because there is comment "Bring interface up to avoid 'not ready' errors when calling iwconfig"
But iwconfig is never called after this, maybe it was in the past.
 
Old 03-09-2021, 12:05 PM   #111
tadgy
Member
 
Registered: May 2018
Location: UK
Distribution: Slackware (servers), Void (desktop/laptop)
Posts: 299

Original Poster
Rep: Reputation: 401Reputation: 401Reputation: 401Reputation: 401Reputation: 401
Quote:
Originally Posted by davjohn View Post
Code:
diff --git a/rc.wireless b/rc.wireless
index 00df8c3..9eaf0fa 100644
--- a/rc.wireless
+++ b/rc.wireless
@@ -343,7 +343,7 @@ else
          echo "$0:  $IWCOMMAND essid \"$ESSID\"" | $LOGGER
          $IWCOMMAND essid "$ESSID"
        fi
-        # Tadgy: don't leave interface up as this causes problems for SLAAC in rc.inet1
-        $IFCOMMAND down
-        sleep 3
 fi
+# Tadgy: don't leave interface up as this causes problems for SLAAC in rc.inet1
+$IFCOMMAND down
+sleep 3
I was worried because there is comment "Bring interface up to avoid 'not ready' errors when calling iwconfig"
But iwconfig is never called after this, maybe it was in the past.
That's weird. Where the take down was before only had an effect if the *very* old way of enabling wireless (in rc.wireless.conf) was used; and where I commented out the 'up' for the wpa_supplicant block should have kept it down.

But, if it works....
 
Old 03-09-2021, 12:09 PM   #112
tadgy
Member
 
Registered: May 2018
Location: UK
Distribution: Slackware (servers), Void (desktop/laptop)
Posts: 299

Original Poster
Rep: Reputation: 401Reputation: 401Reputation: 401Reputation: 401Reputation: 401
Quote:
Originally Posted by tadgy View Post
But, if it works....
Actually; can you test whether the interface will come up if you *just* configure IPv4 networking on the wifi?

I'm hoping that taking the interface down before control is returned to rc.inet1 doesn't effect bringing up other types of networking if SLAAC isn't used.
 
Old 03-09-2021, 01:57 PM   #113
davjohn
Member
 
Registered: Jan 2017
Posts: 94

Rep: Reputation: Disabled
Quote:
Originally Posted by tadgy View Post
Actually; can you test whether the interface will come up if you *just* configure IPv4 networking on the wifi?

I'm hoping that taking the interface down before control is returned to rc.inet1 doesn't effect bringing up other types of networking if SLAAC isn't used.
I'm sure it will, because when SLAAC timeouts interface is brought down anyway. But I will test it.

Edit: Yes it works, DHCP and static configuration.

Last edited by davjohn; 03-09-2021 at 02:12 PM.
 
Old 03-09-2021, 02:35 PM   #114
tadgy
Member
 
Registered: May 2018
Location: UK
Distribution: Slackware (servers), Void (desktop/laptop)
Posts: 299

Original Poster
Rep: Reputation: 401Reputation: 401Reputation: 401Reputation: 401Reputation: 401
Merged into master.

Drink up, it's time to go home!
 
Old 03-10-2021, 01:43 AM   #115
davjohn
Member
 
Registered: Jan 2017
Posts: 94

Rep: Reputation: Disabled
Quote:
Originally Posted by tadgy View Post
Merged into master.

Drink up, it's time to go home!
.
 
Old 03-16-2021, 07:29 PM   #116
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 277

Rep: Reputation: 41
Quote:
Originally Posted by davjohn View Post
Could you try patch bellow?
I have similar problem, eventually, IP is assigned but it takes about 5 minutes.

Code:
--- rc.inet1.orig       2021-02-28 22:01:59.000000000 +0100
+++ rc.inet1    2021-03-06 08:00:03.081951586 +0100
@@ -323,6 +323,35 @@
       debug_log "/sbin/ip address flush dev ${1}"
       /sbin/ip address flush dev ${1}
       IF_UP=0
+      if [ -e /proc/sys/net/ipv6 ] && [ "${USE_DHCP6[$i]}" != "yes" ] && [ "${USE_SLAAC[$i]}" = "yes" ]; then # configure via SLAAC
+        info_log "${1}: enabling SLAAC"
+        # Enable accepting of RA packets, unless explicitly configured not to:
+        if [ "${USE_RA[$i]}" = "no" ]; then
+          debug_log "${1}: ignoring IPv6 RA"
+          echo "0" >/proc/sys/net/ipv6/conf/${1}/accept_ra
+        else
+          debug_log "${1}: accepting IPv6 RA"
+          echo "1" >/proc/sys/net/ipv6/conf/${1}/accept_ra
+        fi
+        # Enable auto configuration of interfaces:
+        echo "1" >/proc/sys/net/ipv6/conf/${1}/autoconf
+        # Bring the interface up:
+        debug_log "/sbin/ip link set dev ${1} up"
+        /sbin/ip link set dev ${1} up
+        echo "${1}: waiting for router announcement"
+        for ((j = ${SLAAC_TIMEOUT[$i]:=15} * 2; j--;)); do # by default, wait a max of 15 seconds for the interface to configure
+          /sbin/ip -6 address show dynamic dev ${1} 2>/dev/null | grep -Ewq 'inet6' && { IF_UP=1; break; }
+          sleep 0.5
+        done
+        if ((IF_UP != 1)); then
+          echo "${1}: timed out"
+          info_log "${1}: failed to auto configure after ${SLAAC_TIMEOUT[$i]} seconds"
+          debug_log "/sbin/ip address flush dev ${1}"
+          /sbin/ip address flush dev ${1}
+          debug_log "/sbin/ip link set dev ${1} down"
+          /sbin/ip link set dev ${1} down
+        fi
+      fi
       # Slackware historically favours dynamic configuration over fixed IP to configure interfaces, so keep that tradition:
       if [ "${USE_DHCP[$i]}" = "yes" ] || { [ -e /proc/sys/net/ipv6 ] && [ "${USE_DHCP6[$i]}" = "yes" ]; }; then # use dhcpcd
         info_log "${1}: starting dhcpcd"
@@ -365,35 +394,6 @@
           debug_log "/sbin/ip address flush dev ${1}"
           /sbin/ip address flush dev ${1}
           debug_log "/sbin/ip link set dev ${1} down"
-          /sbin/ip link set dev ${1} down
-        fi
-      fi
-      if [ -e /proc/sys/net/ipv6 ] && [ "${USE_DHCP6[$i]}" != "yes" ] && [ "${USE_SLAAC[$i]}" = "yes" ]; then # configure via SLAAC
-        info_log "${1}: enabling SLAAC"
-        # Enable accepting of RA packets, unless explicitly configured not to:
-        if [ "${USE_RA[$i]}" = "no" ]; then
-          debug_log "${1}: ignoring IPv6 RA"
-          echo "0" >/proc/sys/net/ipv6/conf/${1}/accept_ra
-        else
-          debug_log "${1}: accepting IPv6 RA"
-          echo "1" >/proc/sys/net/ipv6/conf/${1}/accept_ra
-        fi
-        # Enable auto configuration of interfaces:
-        echo "1" >/proc/sys/net/ipv6/conf/${1}/autoconf
-        # Bring the interface up:
-        debug_log "/sbin/ip link set dev ${1} up"
-        /sbin/ip link set dev ${1} up
-        echo "${1}: waiting for router announcement"
-        for ((j = ${SLAAC_TIMEOUT[$i]:=15} * 2; j--;)); do # by default, wait a max of 15 seconds for the interface to configure
-          /sbin/ip -6 address show dynamic dev ${1} 2>/dev/null | grep -Ewq 'inet6' && { IF_UP=1; break; }
-          sleep 0.5
-        done
-        if ((IF_UP != 1)); then
-          echo "${1}: timed out"
-          info_log "${1}: failed to auto configure after ${SLAAC_TIMEOUT[$i]} seconds"
-          debug_log "/sbin/ip address flush dev ${1}"
-          /sbin/ip address flush dev ${1}
-          debug_log "/sbin/ip link set dev ${1} down"
           /sbin/ip link set dev ${1} down
         fi
       fi
I have not tried your patch. My issue turned out to be router problem and now Slack. My ipv4 is static so I don't see the same timeout issue you mentioned.
 
Old 03-28-2021, 04:24 PM   #117
kaott
Member
 
Registered: Mar 2020
Posts: 63

Rep: Reputation: Disabled
Missing "dev eth0" in configuring IPv6 gateway?

When I try to use a static IPv6 IP and gateway I get:
Code:
Error: egress device not specified
I can change line 618 in /etc/rc.d/rc.inet1 to:
Code:
/sbin/ip -6 route add default via ${GATEWAY6} dev eth0
instead of
Code:
/sbin/ip -6 route add default via ${GATEWAY6}
and this resolves the problem and the default gateway is added.

There are no problems when using a static IPv4 IP and gateway, not sure why the IPv6 requires adding the device name to the command.

The only things in my rc.inet1.conf are setting the:
IPADDRS[0]
IP6ADDRS[0]
GATEWAY
GATEWAY6
variables.
 
Old 03-29-2021, 04:58 AM   #118
tadgy
Member
 
Registered: May 2018
Location: UK
Distribution: Slackware (servers), Void (desktop/laptop)
Posts: 299

Original Poster
Rep: Reputation: 401Reputation: 401Reputation: 401Reputation: 401Reputation: 401
Quote:
Originally Posted by kaott View Post
When I try to use a static IPv6 IP and gateway I get:
Code:
Error: egress device not specified
I've never seen that error before, so have no clue what the cause of your problem is

I'd be interested to know whether anyone else gets the same error when they set a static IPv6 gateway in the new rc.inet1.conf? Please post back your results - even if your configuration works correctly, so I can know if it's a one off or a more serious problem.

Quote:
Originally Posted by kaott View Post
I can change line 618 in /etc/rc.d/rc.inet1 to:
Code:
/sbin/ip -6 route add default via ${GATEWAY6} dev eth0
The problem with changing the line to include the device is we'd have to assume which device the data should leave via. What happens if it's actually eth1 that leads to the default gateway?
Consider:
Code:
IP6ADDRS[0]="1:2:3:4::10/64"
IP6ADDRS[1]="7:8:9:10::10/64"
GATEWAY6="7:8:9:10::1"
In this case, the gateway is reached via the eth1 device, not the primary interface of the host and your assumption that the interface to be used is eth0 would be wrong. Programmatically it would not be simple to try to determine which interface the gateway should be set for just using the gateway IP itself.

Quote:
Originally Posted by kaott View Post
There are no problems when using a static IPv4 IP and gateway, not sure why the IPv6 requires adding the device name to the command.
I'm not sure why your set up seems to require that either
My testing didn't show up this problem, and I'm hoping that no other reports come in with a similar issue.

I know that doesn't help you a lot - sorry about that - but I don't know if this is something that could be easily fixed :/
 
Old 03-29-2021, 03:18 PM   #119
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware
Posts: 490

Rep: Reputation: Disabled
Quote:
Originally Posted by kaott View Post
When I try to use a static IPv6 IP and gateway I get:
Code:
Error: egress device not specified
I can change line 618 in /etc/rc.d/rc.inet1 to:
Code:
/sbin/ip -6 route add default via ${GATEWAY6} dev eth0
instead of
Code:
/sbin/ip -6 route add default via ${GATEWAY6}
and this resolves the problem and the default gateway is added.
"ping6" used to have this problem with link-local addresses, but that was ages ago. You had to specify the host as "fe80::1:2:3:4%eth0".
 
  


Reply

Tags
bond, ipv6, networking, rc.inet1, slackware, testing, vlan



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
[SOLVED] slackware current, typo in new rc.inet1, also is gtk3 now required for firefox? pataphysician Slackware 23 05-24-2017 01:48 AM
Modifications to rc.inet1, rc.inet1.conf and rc.wireless hba Slackware 1 12-07-2014 03:57 AM
Error for wireless request "Set Nickname" (8B1C) -- /etc/rc.d/rc.inet1.conf hellbillyJoker Linux - Networking 1 04-06-2010 07:24 PM
rc.inet1 doesn't give me a new DHCP IP jsmith6 Slackware 3 03-10-2008 04:38 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 10:11 PM.

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