mwan3: check removed route before removal
authorJonas Lochmann <git@inkompetenz.org>
Mon, 1 Jan 2024 00:00:00 +0000 (01:00 +0100)
committerFlorian Eckert <fe@dev.tdt.de>
Tue, 20 Feb 2024 20:53:22 +0000 (21:53 +0100)
This makes mwan3rtmon check if mwan3_get_routes returns a route
before removing it. This helps with IPv6 routes with source address
selector removal where multiple original routes are transformed to
the same mwan3 route if one of the source routes is removed while
the others are kept.

Signed-off-by: Jonas Lochmann <git@inkompetenz.org>
net/mwan3/Makefile
net/mwan3/files/usr/sbin/mwan3rtmon

index 76cc12f58f64f06e7ae756f93802a8d4d08ae959..3d4dd36a14fc412df5a62909a8529751608b37f6 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mwan3
-PKG_VERSION:=2.11.12
+PKG_VERSION:=2.11.13
 PKG_RELEASE:=2
 PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>, \
                Aaron Goodman <aaronjg@alumni.stanford.edu>
index d8ccffeb0484f92cffae5c4c104308f9f8e0dd4a..5f21d0203c7a271336c364371dff6d2299c79909 100755 (executable)
@@ -95,6 +95,13 @@ mwan3_rtmon_route_handle()
        fi
        route_line=$(echo "$route_line" | sed -ne "$MWAN3_ROUTE_LINE_EXP")
 
+       if [ "$action" = "del" ]; then
+               if mwan3_get_routes | grep -qxF "$route_line"; then
+                       LOG debug "deleted but route still exists - $route_line"
+                       return
+               fi
+       fi
+
        handle_route() {
                local error
                local iface=$1