From: Florian Eckert Date: Thu, 16 Jul 2020 13:08:04 +0000 (+0200) Subject: mwan3: fix IPv6 routing add handling X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=8e3e6f8dde654bdf2f1e1cf7bac6c0a2894a3fe8;p=openwrt-packages.git mwan3: fix IPv6 routing add handling This fixes routing handling. Introduced with the last version update. The following message disappears on the shell when mwan3 is called with 'mwna3 restart`. `Error: Invalid gateway address.` Signed-off-by: Florian Eckert [aaronjg@stanford.edu: fully unset variable and handle ipv4 as well] Signed-off-by: Aaron Goodman --- diff --git a/net/mwan3/files/lib/mwan3/mwan3.sh b/net/mwan3/files/lib/mwan3/mwan3.sh index d7def8672..3ce880fd2 100644 --- a/net/mwan3/files/lib/mwan3/mwan3.sh +++ b/net/mwan3/files/lib/mwan3/mwan3.sh @@ -518,6 +518,8 @@ mwan3_create_iface_route() network_get_gateway${V_} via "$1" fi + ( [ -z "$via" ] || [ "$via" = "0.0.0.0" ] || [ "$via" = "::" ] ) && unset via + network_get_metric metric "$1" $IP route flush table "$id"