summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2013-08-22 11:32:18 -0400
committerIan Stakenvicius <axs@gentoo.org>2013-08-22 11:32:18 -0400
commit8a958b68a2622770bd6fd13e6a0bc50087fb50f2 (patch)
treecb4c79ffe879c35a4c324afe805bd2613ee9f139
parentrename package to netifrc (diff)
downloadnetifrc-8a958b68a2622770bd6fd13e6a0bc50087fb50f2.tar.gz
netifrc-8a958b68a2622770bd6fd13e6a0bc50087fb50f2.tar.bz2
netifrc-8a958b68a2622770bd6fd13e6a0bc50087fb50f2.zip
drop _has_carrier check from ipv6_tentative since it doesn't do what we expect, and add new dad_timeout option defaulting to 5s for bug 481970
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
-rw-r--r--doc/net.example.BSD.in9
-rw-r--r--doc/net.example.Linux.in9
-rw-r--r--net/iproute2.sh6
3 files changed, 21 insertions, 3 deletions
diff --git a/doc/net.example.BSD.in b/doc/net.example.BSD.in
index 3aae310..2509c9f 100644
--- a/doc/net.example.BSD.in
+++ b/doc/net.example.BSD.in
@@ -84,6 +84,15 @@
# long we wait for carrier. The current default is disabled.
#carrier_timeout_eth0=0
+# IPv6 addresses usually must complete a duplicate address detection process
+# before they can be bound to by daemons; they are held in a 'tentative' state
+# until this completes. Setting the 'nodad' flag (see config_eth0 above) is
+# one way to avoid this tentative state, otherwise the service will wait
+# dad_timeout seconds (defaults to 5) for tentative state to clear on all IPv6
+# addresses set on the interface. As usual, dad_timeout can be adjusted on a
+# per-interface basis. Set to 0 to disable the wait entirely.
+#dad_timeout_eth0=5
+
# You may wish to disable the interface being brought down when stopping.
# This is only of use for WakeOnLan.
#ifdown_eth0="NO"
diff --git a/doc/net.example.Linux.in b/doc/net.example.Linux.in
index d8fa084..8c44647 100644
--- a/doc/net.example.Linux.in
+++ b/doc/net.example.Linux.in
@@ -133,6 +133,15 @@
# long we wait for carrier. The current default is disabled.
#carrier_timeout_eth0=0
+# IPv6 addresses usually must complete a duplicate address detection process
+# before they can be bound to by daemons; they are held in a 'tentative' state
+# until this completes. Setting the 'nodad' flag (see config_eth0 above) is
+# one way to avoid this tentative state, otherwise the service will wait
+# dad_timeout seconds (defaults to 5) for tentative state to clear on all IPv6
+# addresses set on the interface. As usual, dad_timeout can be adjusted on a
+# per-interface basis. Set to 0 to disable the wait entirely.
+#dad_timeout_eth0=5
+
# You may wish to disable the interface being brought down when stopping.
# This is only of use for WakeOnLan.
#ifdown_eth0="NO"
diff --git a/net/iproute2.sh b/net/iproute2.sh
index 3bab7b7..d8e8b8b 100644
--- a/net/iproute2.sh
+++ b/net/iproute2.sh
@@ -286,15 +286,15 @@ iproute2_pre_start()
_iproute2_ipv6_tentative()
{
- # Only check tentative when we have a carrier.
- _has_carrier || return 1
LC_ALL=C ip addr show dev "${IFACE}" | \
grep -q "^[[:space:]]*inet6 .* tentative"
}
iproute2_post_start()
{
- local n=5
+ local n=
+ eval n=\$dad_timeout_${IFVAR}
+ [ -z "$n" ] && n=${dad_timeout:-5}
# Kernel may not have IP built in
if [ -e /proc/net/route ]; then