diff options
author | Darren 'Tadgy' Austin <darren@afterdark.org.uk> | 2018-08-20 19:22:29 +0100 |
---|---|---|
committer | Robby Workman <rworkman@slackware.com> | 2018-11-25 20:01:18 -0600 |
commit | e5923958f49481b634c1720b1121759d033a18ce (patch) | |
tree | 017c0940fab4d973f78e67309fdf6a06a51c7610 | |
parent | 3494ffc880b0f3a1360e7d98c088ab840d83e12d (diff) | |
download | slacknetsetup-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>
-rw-r--r-- | rc.inet1 | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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" |