From f71bd3f93ca15efd4e64c93f35eafc5d2cc95943 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 15 Mar 2011 15:30:12 +0000 Subject: [PATCH] * dhclient: ignore libvirt's network interfaces. svn path=/nixos/trunk/; revision=26327 --- modules/services/networking/dhclient.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/services/networking/dhclient.nix b/modules/services/networking/dhclient.nix index dc8b378e875..2acef81e1e5 100644 --- a/modules/services/networking/dhclient.nix +++ b/modules/services/networking/dhclient.nix @@ -82,10 +82,11 @@ in # Only run dhclient on interfaces of type ARPHRD_ETHER # (1), i.e. Ethernet. Ignore peth* devices; on Xen, # they're renamed physical Ethernet cards used for - # bridging. Likewise for vif* and tap*. + # bridging. Likewise for vif* and tap* (Xen) and + # virbr* and vnet* (libvirt). if [ "$(cat /sys/class/net/$i/type)" = 1 ]; then if ! for j in ${toString ignoredInterfaces}; do echo $j; done | grep -F -x -q "$i" && - ! echo "$i" | grep -x -q "peth.*\|vif.*\|tap.*"; + ! echo "$i" | grep -x -q "peth.*\|vif.*\|tap.*\|virbr.*\|vnet.*"; then echo "Running dhclient on $i" interfaces="$interfaces $i"