From 8e3e6f8dde654bdf2f1e1cf7bac6c0a2894a3fe8 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 16 Jul 2020 15:08:04 +0200 Subject: [PATCH] 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 --- net/mwan3/files/lib/mwan3/mwan3.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mwan3/files/lib/mwan3/mwan3.sh b/net/mwan3/files/lib/mwan3/mwan3.sh index d7def8672a..3ce880fd25 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" -- 2.30.2