summaryrefslogtreecommitdiffstats
path: root/src/lib/ip
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2014-02-27 12:48:12 +0100
committerJouke Witteveen <j.witteveen@gmail.com>2014-02-27 13:48:48 +0100
commitbcca0a027786c0d23f3f70c9f21b3332f41786e1 (patch)
tree5fbd7b516753e23e2a8785d9730c2a86f692ca38 /src/lib/ip
parent05959bbbae46724d9abe1c32ca69eaaf2ca20722 (diff)
downloadnetctl-bcca0a027786c0d23f3f70c9f21b3332f41786e1.tar.gz
netctl-bcca0a027786c0d23f3f70c9f21b3332f41786e1.tar.xz
Add option to bypass Duplicate Address Detection
After several requests, here is SkipDAD to bypass Duplicate Address Detection.
Diffstat (limited to 'src/lib/ip')
-rw-r--r--src/lib/ip12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/ip b/src/lib/ip
index a93eaee..4698595 100644
--- a/src/lib/ip
+++ b/src/lib/ip
@@ -117,7 +117,7 @@ ip_set() {
;;
stateless|static)
for addr in "${Address6[@]}"; do
- if ! do_debug ip -6 addr add $addr dev "$Interface"; then
+ if ! do_debug ip -6 addr add $addr $(is_yes "${SkipDAD:-no}" && printf nodad) dev "$Interface"; then
report_error "Could not add address '$addr' to interface '$Interface'"
fi
done
@@ -125,10 +125,12 @@ ip_set() {
esac
if [[ $IP6 ]]; then
- # Wait for Duplicate Address Detection to finish
- if ! timeout_wait "${TimeoutDAD:-3}" '[[ -z "$(ip -6 addr show dev "$Interface" tentative)" ]]'; then
- report_error "Duplicate Address Detection is taking too long on interface '$Interface'"
- return 1
+ if ! is_yes "${SkipDAD:-no}"; then
+ # Wait for Duplicate Address Detection to finish
+ if ! timeout_wait "${TimeoutDAD:-3}" '[[ -z "$(ip -6 addr show dev "$Interface" tentative)" ]]'; then
+ report_error "Duplicate Address Detection is taking too long on interface '$Interface'"
+ return 1
+ fi
fi
# Add static IPv6 routes after DAD has finished