From e5923958f49481b634c1720b1121759d033a18ce Mon Sep 17 00:00:00 2001 From: Darren 'Tadgy' Austin Date: Mon, 20 Aug 2018 19:22:29 +0100 Subject: 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 --- rc.inet1 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rc.inet1') 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" -- cgit v1.2.3