nixos/network-interfaces-scripted: disable DAD
Duplicate address detection (DAD) causes newly added IPv6 addresses to be effectively unusable for an unpredictable amount of time, introducing race conditions in the network setup. For example, a "tentative" addresses is not considered a valid source address, so installing routes can fail unpredictably. This change disables DAD for static IPv6 addresses, with the assumption that the user already made sure they are unique when configuring the network.
This commit is contained in:
@@ -240,10 +240,10 @@ let
|
||||
''
|
||||
echo "${cidr}" >> $state
|
||||
echo -n "adding address ${cidr}... "
|
||||
if out=$(ip addr replace "${cidr}" dev "${i.name}" 2>&1); then
|
||||
if out=$(ip addr replace "${cidr}" dev "${i.name}" nodad 2>&1); then
|
||||
echo "done"
|
||||
else
|
||||
echo "'ip addr replace \"${cidr}\" dev \"${i.name}\"' failed: $out"
|
||||
echo "'ip addr replace \"${cidr}\" dev \"${i.name}\"' nodad failed: $out"
|
||||
exit 1
|
||||
fi
|
||||
''
|
||||
|
||||
Reference in New Issue
Block a user