base-files: change network_find_wan() procedure to ignore default gateways in different routing tables

SVN-Revision: 36553
This commit is contained in:
Jo-Philipp Wich
2013-05-06 09:33:56 +00:00
parent 3c17fd41a4
commit 026271d03c
2 changed files with 14 additions and 10 deletions

View File

@@ -80,16 +80,20 @@ __network_parse_ifstatus()
while json_is_a "$__idx" object; do
json_select "$((__idx++))"
json_get_var __tmp target
json_get_var __tmp table
case "${__tmp}" in
0.0.0.0)
__network_set_cache "${__key}_gateway4" nexthop
;;
::)
__network_set_cache "${__key}_gateway6" nexthop
;;
esac
if [ -z "$__tmp" ]; then
json_get_var __tmp target
case "${__tmp}" in
0.0.0.0)
__network_set_cache "${__key}_gateway4" nexthop
;;
::)
__network_set_cache "${__key}_gateway6" nexthop
;;
esac
fi
json_select ".."