Hello!
I have been troubleshooting issues using mwan3 and wireguard and I think I have identified one of my problems.
I have 2 WANs - WAN (ethernet) and UWAN (usb tether).
I reboot OpenWrt and I am connected to WAN and WireGuard is working (I have rules set in mwan3 to point one local lan address to the tunnel).
I disconnect the ethernet cable on WAN and UWAN picks up the routing, except WireGuard doesn't work. It will try and transmit packets, but none are received. At this point if I ifdown WAN WireGuard instantly comes back to life using UWAN.
When I perform the same scenario in reverse, I start with UWAN connected using WireGuard, everything is working, I plug WAN back in and pull the USB from UWAN, it looses its IP and is "down" on its own.
However, this got me thinking, if a mwan3 thinks an interface is down, unless that interface is ifdown'd, WireGuard won't reconnect using the up interface.
What I would like to do is run a script when mwan3 changes the interface, to automatically ifdown the interface it switched from, wait 10 seconds and then ifup. That way if a device is turned off, or has its cord pulled, or is getting no ping back, WireGuard will switch to the working interface.
I really hope this makes sense!