modules/tasks/network-interfaces.nix: create network bridges with "forward delay" set to zero
This change obsoletes the need to increase the IPv6 "router_solicitations" parameter. svn path=/nixos/trunk/; revision=29493
This commit is contained in:
parent
84a37365c2
commit
32d6a441a5
@ -214,19 +214,14 @@ in
|
|||||||
echo "Creating bridge ${n}..."
|
echo "Creating bridge ${n}..."
|
||||||
${pkgs.bridge_utils}/sbin/brctl addbr "${n}"
|
${pkgs.bridge_utils}/sbin/brctl addbr "${n}"
|
||||||
|
|
||||||
|
# Set bridge's hello time to 0 to avoid startup delays.
|
||||||
|
${pkgs.bridge_utils}/sbin/brctl setfd "${n}" 0
|
||||||
|
|
||||||
${flip concatMapStrings v.interfaces (i: ''
|
${flip concatMapStrings v.interfaces (i: ''
|
||||||
${pkgs.bridge_utils}/sbin/brctl addif "${n}" "${i}"
|
${pkgs.bridge_utils}/sbin/brctl addif "${n}" "${i}"
|
||||||
ip addr flush dev "${i}"
|
ip addr flush dev "${i}"
|
||||||
'')}
|
'')}
|
||||||
|
|
||||||
# For some reason enslaving an interface to a bridge
|
|
||||||
# causes traffic to be blocked for a few seconds, long
|
|
||||||
# enough for IPv6 router solicitations to get lost.
|
|
||||||
# So increase the number of attemts.
|
|
||||||
${optionalString cfg.enableIPv6 ''
|
|
||||||
echo 5 > /proc/sys/net/ipv6/conf/${n}/router_solicitations
|
|
||||||
''}
|
|
||||||
|
|
||||||
# !!! Should delete (brctl delif) any interfaces that
|
# !!! Should delete (brctl delif) any interfaces that
|
||||||
# no longer belong to the bridge.
|
# no longer belong to the bridge.
|
||||||
'')))}
|
'')))}
|
||||||
|
Loading…
Reference in New Issue
Block a user