From e119a57e97e894f0636df999d82807ae5c494030 Mon Sep 17 00:00:00 2001 From: Jonas Lochmann Date: Mon, 1 Jan 2024 01:00:00 +0100 Subject: [PATCH] mwan3: check removed route before removal 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 --- net/mwan3/Makefile | 2 +- net/mwan3/files/usr/sbin/mwan3rtmon | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/net/mwan3/Makefile b/net/mwan3/Makefile index 76cc12f58f..3d4dd36a14 100644 --- a/net/mwan3/Makefile +++ b/net/mwan3/Makefile @@ -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 , \ Aaron Goodman diff --git a/net/mwan3/files/usr/sbin/mwan3rtmon b/net/mwan3/files/usr/sbin/mwan3rtmon index d8ccffeb04..5f21d0203c 100755 --- a/net/mwan3/files/usr/sbin/mwan3rtmon +++ b/net/mwan3/files/usr/sbin/mwan3rtmon @@ -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