diff options
author | Florian Eckert <fe@dev.tdt.de> | 2020-07-16 15:08:04 +0200 |
---|---|---|
committer | Aaron Goodman <aaronjg@stanford.edu> | 2020-07-19 23:24:13 -0400 |
commit | 8e3e6f8dde654bdf2f1e1cf7bac6c0a2894a3fe8 (patch) | |
tree | 88f9d6ad5f5dd8c0f816c0c46ecf15c04d4bee51 | |
parent | a796b7a84e8bce84b01c5fb23e6e5953e643b57d (diff) |
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 <fe@dev.tdt.de>
[aaronjg@stanford.edu: fully unset variable and handle ipv4 as well]
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
-rw-r--r-- | net/mwan3/files/lib/mwan3/mwan3.sh | 2 |
1 files changed, 2 insertions, 0 deletions
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" |