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>
This commit is contained in:
Dave Wallace
2016-02-03 22:34:04 -05:00
committed by Gerrit Code Review
parent 9de836c715
commit d255ee13f5

View 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