Change non-default route ethernet interfaces state to down so VPP will use them.
authorDave Wallace <[email protected]>
Thu, 4 Feb 2016 03:34:04 +0000 (22:34 -0500)
committerGerrit Code Review <[email protected]>
Thu, 4 Feb 2016 13:13:21 +0000 (13:13 +0000)
Change-Id: Icdb1a8d35a97e01d5e1be13fdc89ce3f9ec62e1a
Signed-off-by: Dave Wallace <[email protected]>
build-root/vagrant/bootstrap.ubuntu1404.sh

index a8381bb..fc1a3b8 100644 (file)
@@ -52,6 +52,18 @@ cd ~vagrant/
 sudo -u vagrant mkdir -p git/vpp
 cp /vagrant/README.moved git/vpp/
 
+# Disable all ethernet interfaces other than the default route
+# interface so VPP will use those interfaces.  The VPP auto-blacklist
+# algorithm prevents the use of any physical interface contained in the
+# routing table (i.e. "route --inet --inet6") preventing the theft of
+# the management ethernet interface by VPP from the kernel.
+for intf in $(ls /sys/class/net) ; do
+    if [ -d /sys/class/net/$intf/device ] && 
+        [ "$(route --inet --inet6 | grep default | grep $intf)" == "" ] ; then
+        ifconfig $intf down
+    fi
+done
+
 cd /vpp/
 
 # Initial vpp build