summaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-05-06 09:33:56 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-05-06 09:33:56 +0000
commitbd4ec4d567494ce433865557e7896a2072f16707 (patch)
treea79cba4aa2044ebcf415befe4b3701f43f09dc85 /package/base-files
parent7fcd308f5487ca56232786e87e9fd862b830e89b (diff)
base-files: change network_find_wan() procedure to ignore default gateways in different routing tables
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36553 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/Makefile2
-rw-r--r--package/base-files/files/lib/functions/network.sh24
2 files changed, 15 insertions, 11 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index acd5e2e19..050cc77b5 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/version.mk
PKG_NAME:=base-files
-PKG_RELEASE:=137
+PKG_RELEASE:=138
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
PKG_BUILD_DEPENDS:=opkg/host
diff --git a/package/base-files/files/lib/functions/network.sh b/package/base-files/files/lib/functions/network.sh
index 369fa3dbd..d86a504bf 100644
--- a/package/base-files/files/lib/functions/network.sh
+++ b/package/base-files/files/lib/functions/network.sh
@@ -80,16 +80,20 @@ __network_parse_ifstatus()
while json_is_a "$__idx" object; do
json_select "$((__idx++))"
- 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
+ json_get_var __tmp table
+
+ 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 ".."