summaryrefslogtreecommitdiffstats
path: root/rc.inet1
diff options
context:
space:
mode:
authorDarren 'Tadgy' Austin <darren@afterdark.org.uk>2018-08-20 19:22:29 +0100
committerRobby Workman <rworkman@slackware.com>2018-11-25 20:01:18 -0600
commite5923958f49481b634c1720b1121759d033a18ce (patch)
tree017c0940fab4d973f78e67309fdf6a06a51c7610 /rc.inet1
parent3494ffc880b0f3a1360e7d98c088ab840d83e12d (diff)
downloadslacknetsetup-e5923958f49481b634c1720b1121759d033a18ce.tar.xz
rc.inet1: sleep for 3 seconds after setting all the interface options/IPs
In testing here, this was necessary to prevent daemons reporting 'Cannot assign requested address' for IPv6 addresses when they attempt to bind() to the interface address. This only seems to affect v6 addresses - v4 addresses seem to be immediately available to bind() - but a 3 second pause shouldn't hurt given that the other methods of configuration can block for up to 15 seconds. Signed-off-by: Robby Workman <rworkman@slackware.com>
Diffstat (limited to 'rc.inet1')
-rw-r--r--rc.inet14
1 files changed, 4 insertions, 0 deletions
diff --git a/rc.inet1 b/rc.inet1
index 5b210a0..1e3752a 100644
--- a/rc.inet1
+++ b/rc.inet1
@@ -292,6 +292,10 @@ if_up() {
echo "/etc/rc.d/rc.inet1: /sbin/ip link set dev ${1} promisc on" | $LOGGER
/sbin/ip link set dev ${1} promisc on
fi
+ # Some settings need a small time to come into effect on the interface.
+ # This mostly affects IPv6, which needs time to make the interfaces available for the
+ # daemons to bind() - without this delay, they fail to bind() v6 addresses.
+ sleep 3
fi
else
debug_log "${1} is already up, skipping"