summaryrefslogtreecommitdiffstats
path: root/build-root/vagrant
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2016-02-03 22:34:04 -0500
committerGerrit Code Review <gerrit@fd.io>2016-02-04 13:13:21 +0000
commitd255ee13f57a73d2374dbcd63b1a377d88672557 (patch)
tree068765ce13808e6c4f79fe679023585600a21b6a /build-root/vagrant
parent9de836c71531afe2443b55f34c9400d7cc889f5d (diff)
Change non-default route ethernet interfaces state to down so VPP will use them.
Change-Id: Icdb1a8d35a97e01d5e1be13fdc89ce3f9ec62e1a Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'build-root/vagrant')
-rw-r--r--build-root/vagrant/bootstrap.ubuntu1404.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/build-root/vagrant/bootstrap.ubuntu1404.sh b/build-root/vagrant/bootstrap.ubuntu1404.sh
index a8381bb4adc..fc1a3b8d1ef 100644
--- a/build-root/vagrant/bootstrap.ubuntu1404.sh
+++ b/build-root/vagrant/bootstrap.ubuntu1404.sh
@@ -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