From bb03165dc951d17edc026e2a0ad2aeac3cd85fd2 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 10 Jun 2020 15:53:52 +0200 Subject: [PATCH] Fix log flood --- .../usr/share/omr/post-tracking.d/post-tracking | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking index 75a5b41ce..927a2853f 100755 --- a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking +++ b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking @@ -86,9 +86,17 @@ set_routes_intf() { weight=1 fi if [ "$multipath_config_route" = "backup" ]; then - routesintfbackup="$routesintf nexthop via $interface_gw dev $interface_if weight $weight" + if [ -z "$routesintfbackup" ]; then + routesintfbackup="nexthop via $interface_gw dev $interface_if weight $weight" + else + routesintfbackup="$routesintfbackup nexthop via $interface_gw dev $interface_if weight $weight" + fi else - routesintf="$routesintf nexthop via $interface_gw dev $interface_if weight $weight" + if [ -z "$routesintf" ]; then + routesintf="nexthop via $interface_gw dev $interface_if weight $weight" + else + routesintf="$routesintf nexthop via $interface_gw dev $interface_if weight $weight" + fi fi fi fi