Mwan3 not removing wan default route when detected offline

     ISP1                     ISP2
      |                        |
      |                        |
      | routerA_wan            | routerB_wan
      |                        |
  -----------              -----------
  | routerA |              | routerB |
  -----------              -----------
          | routerA_lanX           | routerB_lanX
          |                        |
          |____        ____________|
	      |        |
              |        |
          wan |        | lan1(wanb)  
            ---------------
            | routerMwan3 |
            ---------------
	           | lan2
	           |
	           |
	           |
	         client


(using snapshot, as of Mar 20,2022)

using defaults; balanced (https://openwrt.org/docs/guide-user/network/wan/multiwan/mwan3)


when disconnecting cable from wan(metric 10) or lan1(metric 20) ports, seems to work

but when routerA_wan cable is disconnected, default route for wan (routerA) is still in the routing table (of routerMwan3); even though it's detected as offline, causing no connection out

how can it be configured so that the default route for wan is removed from routing table, in this case (when routerA_wan cable is disconnected) ?


        

how can we use /etc/mwan3.user to log the events/variable-values available to script the removal of the logically-offline wan route? (simple echo should suffice? and where does it get logged to?)


if [ "${ACTION}" = "disconnected" ] ; 
then
  logger -t 'mwan3.user' route del default ${DEVICE}
  route del default ${INTERFACE}
fi

seems to work

but now, reconnecting router<>_wan cable doesn't get detected

now, exchanging wan/lan1, disconnecting cable routerB_wan:

logread | grep -i mwan3

Tue Mar 22 07:58:54 2022 user.notice mwan3track[1882]: Interface wanb (lan1) is online
Fri Mar 25 08:34:23 2022 user.info mwan3track[1881]: Check (ping) failed for target "208.67.220.220" on interface wan (). Current score: 10
Fri Mar 25 08:34:23 2022 user.notice mwan3track[1881]: Interface wan () is disconnecting
Fri Mar 25 08:34:23 2022 user.notice mwan3track[1881]: Interface wan (wan) is online
Fri Mar 25 08:34:24 2022 user.info mwan3track[1882]: Check (ping) failed for target "8.8.4.4" on interface wanb (lan1). Current score: 9
Fri Mar 25 08:34:28 2022 user.info mwan3track[1882]: Check (ping) failed for target "8.8.8.8" on interface wanb (lan1). Current score: 9
Fri Mar 25 08:34:32 2022 user.info mwan3track[1882]: Check (ping) failed for target "208.67.222.222" on interface wanb (lan1). Current score: 9
Fri Mar 25 08:34:36 2022 user.info mwan3track[1882]: Check (ping) failed for target "208.67.220.220" on interface wanb (lan1). Current score: 9
Fri Mar 25 08:34:36 2022 user.notice mwan3track[1882]: Interface wanb (lan1) is disconnecting
Fri Mar 25 08:34:46 2022 user.info mwan3track[1882]: Check (ping) failed for target "8.8.4.4" on interface wanb (lan1). Current score: 8
Fri Mar 25 08:34:50 2022 user.info mwan3track[1882]: Check (ping) failed for target "8.8.8.8" on interface wanb (lan1). Current score: 8
Fri Mar 25 08:34:54 2022 user.info mwan3track[1882]: Check (ping) failed for target "208.67.222.222" on interface wanb (lan1). Current score: 8
Fri Mar 25 08:34:58 2022 user.info mwan3track[1882]: Check (ping) failed for target "208.67.220.220" on interface wanb (lan1). Current score: 8
Fri Mar 25 08:35:07 2022 user.info mwan3track[1882]: Check (ping) failed for target "8.8.4.4" on interface wanb (lan1). Current score: 7
Fri Mar 25 08:35:11 2022 user.info mwan3track[1882]: Check (ping) failed for target "8.8.8.8" on interface wanb (lan1). Current score: 7
Fri Mar 25 08:35:15 2022 user.info mwan3track[1882]: Check (ping) failed for target "208.67.222.222" on interface wanb (lan1). Current score: 7
Fri Mar 25 08:35:19 2022 user.info mwan3track[1882]: Check (ping) failed for target "208.67.220.220" on interface wanb (lan1). Current score: 7
Fri Mar 25 08:35:28 2022 user.info mwan3track[1882]: Check (ping) failed for target "8.8.4.4" on interface wanb (lan1). Current score: 6
Fri Mar 25 08:35:32 2022 user.info mwan3track[1882]: Check (ping) failed for target "8.8.8.8" on interface wanb (lan1). Current score: 6
Fri Mar 25 08:35:36 2022 user.info mwan3track[1882]: Check (ping) failed for target "208.67.222.222" on interface wanb (lan1). Current score: 6
Fri Mar 25 08:35:40 2022 user.info mwan3track[1882]: Check (ping) failed for target "208.67.220.220" on interface wanb (lan1). Current score: 6
Fri Mar 25 08:35:40 2022 user.notice mwan3track[1882]: Interface wanb (lan1) is offline
Fri Mar 25 08:35:41 2022 user.notice mwan3-hotplug[5982]: Execute disconnected event on interface wanb (lan1)
Fri Mar 25 08:52:44 2022 user.info mwan3track[1881]: Check (ping) failed for target "8.8.8.8" on interface wan (wan). Current score: 10
Fri Mar 25 09:07:20 2022 user.notice mwan3-hotplug[24780]: Execute ifdown event on interface wanb (unknown)
Fri Mar 25 09:07:20 2022 user.info mwan3track[1882]: Detect ifdown event on interface wanb (lan1)
Fri Mar 25 09:07:20 2022 user.notice mwan3track[1882]: Interface wanb (lan1) is offline
Fri Mar 25 09:07:23 2022 user.notice mwan3-hotplug[24992]: Execute disconnected event on interface wanb (lan1)
Fri Mar 25 09:07:26 2022 user.notice mwan3-hotplug[25810]: Execute ifup event on interface wanb (lan1)
Fri Mar 25 09:07:26 2022 user.warn mwan3-hotplug[25810]: failed to add 192.168.18.0/24 dev lan1 proto static scope link metric 20 to table 3
Fri Mar 25 09:07:26 2022 user.warn mwan3-hotplug[25810]: failed to add default via 192.168.18.1 dev lan1 proto static src 192.168.18.245 metric 20 to table 3
Fri Mar 25 09:07:28 2022 user.info mwan3track[1882]: Detect ifup event on interface wanb (lan1)
Fri Mar 25 09:07:44 2022 user.notice mwan3track[1882]: Interface wanb (lan1) is online
Fri Mar 25 09:14:40 2022 user.notice mwan3-hotplug[13018]: Execute ifup event on interface wanb (lan1)
Fri Mar 25 09:14:40 2022 user.warn mwan3-hotplug[13018]: failed to add 192.168.18.0/24 dev lan1 proto static scope link metric 20 to table 3
Fri Mar 25 09:14:40 2022 user.warn mwan3-hotplug[13018]: failed to add default via 192.168.18.1 dev lan1 proto static src 192.168.18.245 metric 20 to table 3
Fri Mar 25 09:14:42 2022 user.info mwan3track[1882]: Detect ifup event on interface wanb (lan1)
Fri Mar 25 09:14:42 2022 user.notice mwan3track[1882]: Interface wanb (lan1) is online
Fri Mar 25 09:14:55 2022 user.notice mwan3-hotplug[13423]: Execute ifdown event on interface wanb (unknown)
Fri Mar 25 09:14:55 2022 user.info mwan3track[1882]: Detect ifdown event on interface wanb (lan1)
Fri Mar 25 09:14:55 2022 user.notice mwan3track[1882]: Interface wanb (lan1) is offline
Fri Mar 25 09:14:57 2022 user.notice mwan3-hotplug[13515]: Execute disconnected event on interface wanb (lan1)

still have default route for wanb:

mwan3 interfaces

Interface status:
 interface wan is online 01h:01m:30s, uptime 01h:01m:54s and tracking is active
 interface wan6 is disabled and tracking is down
 interface wanb is error (23) and tracking is paused
 interface wanb6 is offline and tracking is down

ip route

default via 192.168.18.1 dev lan1 proto static src 192.168.18.245 metric 20 
default via 192.168.202.1 dev wan proto static src 192.168.202.209 metric 30 
192.168.18.0/24 dev lan1 proto static scope link metric 20 
192.168.202.0/24 dev wan proto static scope link metric 30