Mwan3 after update not working

My mwan3 also broke after the recent updates. It is a simple WAN/WWAN failover. I fixed it by doing the following:

opkg update
opkg remove luci-app-mwan3
opkg remove mwan3
mv /etc/config/mwan3 /root/mwan3
opkg install mwan3 luci-app-mwan3

I then changed the first couple of lines of /lib/mwan3/mwan3.sh to have the full path to ip, ipset and iptables:

IP4="/usr/sbin/ip -4"
IP6="/usr/sbin/ip -6"
IPS="/usr/sbin/ipset"
IPT4="/usr/sbin/iptables -t mangle -w"
IPT6="/usr/sbin/ip6tables -t mangle -w"

After that, I rebuilt my rules in /etc/config/mwan3 (basically, search-replaced all wanb to wwan, set all IPv6 rules to disabled, removed the default http policy and changed the default rule to policy wan_wwan) and then ran /usr/sbin/mwan3 restart - and it worked!

Turns out, with the new update, you need the full path to ip for fwmark to work, and if you don’t have IPv6 rules in your config (which I don’t, since I don’t have IPv6 natively on either of my connections), the rtmon script break everything (and spams the logs with uci errors).

The network_get_metric error is still there, but it does not appear to affect my setup as far as I can tell.

@Pepe, you may want to update your bug with the above info.

6 Likes