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>
(cherry picked from commit 8e3e6f8dde
)
This commit is contained in:
parent
447d51edbf
commit
2c89e14c31
1 changed files with 2 additions and 0 deletions
|
@ -518,6 +518,8 @@ mwan3_create_iface_route()
|
||||||
network_get_gateway${V_} via "$1"
|
network_get_gateway${V_} via "$1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
( [ -z "$via" ] || [ "$via" = "0.0.0.0" ] || [ "$via" = "::" ] ) && unset via
|
||||||
|
|
||||||
network_get_metric metric "$1"
|
network_get_metric metric "$1"
|
||||||
|
|
||||||
$IP route flush table "$id"
|
$IP route flush table "$id"
|
||||||
|
|
Loading…
Reference in a new issue