From 32d6a441a590c59df7350fcd7ca2d0390e163420 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 26 Sep 2011 09:41:40 +0000 Subject: [PATCH] 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 --- modules/tasks/network-interfaces.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/tasks/network-interfaces.nix b/modules/tasks/network-interfaces.nix index f3603127b26..27ca840ecdb 100644 --- a/modules/tasks/network-interfaces.nix +++ b/modules/tasks/network-interfaces.nix @@ -214,19 +214,14 @@ in echo "Creating bridge ${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: '' ${pkgs.bridge_utils}/sbin/brctl addif "${n}" "${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 # no longer belong to the bridge. '')))}