added reset interfaces at FRR startup

adds an interface down and up for all interfaces except lo; assists babel in particular
This commit is contained in:
apwiggins 2020-01-20 11:17:45 -04:00 committed by GitHub
parent 5ae3ad9011
commit 14db4eb383
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -225,8 +225,23 @@ if [ "$1" != "zebra" ]; then
echo "WARNING: '$1': all FRR daemons are launched by the 'zebra' service!" echo "WARNING: '$1': all FRR daemons are launched by the 'zebra' service!"
exit 1 exit 1
fi fi
resetinterfaces()
{
for iface in $(ifconfig | cut -d ' ' -f1 | tr ':' '\\n' | awk NF)
do
if [ "$iface" != "lo" ]
then
ip link set dev $iface down
sleep 1
ip link set dev $iface up
fi
done
}
confcheck confcheck
bootfrr bootfrr
resetinterfaces
""" % ( """ % (
cls.configs[0], cls.configs[0],
frr_sbin_search, frr_sbin_search,