summaryrefslogtreecommitdiff
path: root/package/6in4/files
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-08-12 10:30:05 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-08-12 10:30:05 +0000
commite7b3af1cbaa8e89a29eede0823ab770ead1f107e (patch)
tree8f4e754f72d05d1a7072e42f61402a0c33390bbe /package/6in4/files
parent01658f6e25197d603a1fcd0c14eda097316bf5a2 (diff)
[package] 6in4: fix local address detection on ppp links (#7728)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22605 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/6in4/files')
-rwxr-xr-xpackage/6in4/files/6in4.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/6in4/files/6in4.sh b/package/6in4/files/6in4.sh
index 5e416ee0bd..a119138d0f 100755
--- a/package/6in4/files/6in4.sh
+++ b/package/6in4/files/6in4.sh
@@ -2,13 +2,13 @@
# Copyright (c) 2010 OpenWrt.org
find_6in4_wanif() {
- local if=$(ip -4 r l e 0/0); if="${if#default via * dev }"; if="${if%% *}"
+ local if=$(ip -4 r l e 0/0); if="${if#default* dev }"; if="${if%% *}"
[ -n "$if" ] && grep -qs "^ *$if:" /proc/net/dev && echo "$if"
}
find_6in4_wanip() {
local ip=$(ip -4 a s dev "$1"); ip="${ip#*inet }"
- echo "${ip%%/[0-9]* brd *}"
+ echo "${ip%%[^0-9.]*}"
}
# Hook into scan_interfaces() to synthesize a .device option