Skip to content

Commit

Permalink
mwan3: check removed route before removal
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Jonas Lochmann authored and feckert committed Feb 20, 2024
1 parent fe736b2 commit e119a57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion net/mwan3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>, \
Aaron Goodman <[email protected]>
Expand Down
7 changes: 7 additions & 0 deletions net/mwan3/files/usr/sbin/mwan3rtmon
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e119a57

Please sign in to comment.