From 14db4eb38399b3493c1a813bdc31b1c5d3b8aa44 Mon Sep 17 00:00:00 2001 From: apwiggins Date: Mon, 20 Jan 2020 11:17:45 -0400 Subject: [PATCH] added reset interfaces at FRR startup adds an interface down and up for all interfaces except lo; assists babel in particular --- daemon/core/services/frr.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/daemon/core/services/frr.py b/daemon/core/services/frr.py index 95ffb0b5..436bc82c 100644 --- a/daemon/core/services/frr.py +++ b/daemon/core/services/frr.py @@ -225,8 +225,23 @@ if [ "$1" != "zebra" ]; then echo "WARNING: '$1': all FRR daemons are launched by the 'zebra' service!" exit 1 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 bootfrr +resetinterfaces """ % ( cls.configs[0], frr_sbin_search,