summaryrefslogtreecommitdiff
path: root/package/6in4/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-08-12 10:30:05 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-08-12 10:30:05 +0000
commit28a93eed3c125d4aef983cca05c56f93d484fa5d (patch)
treeda448002b94503bca88f299db0494622235311dd /package/6in4/files
parent2d175dcdcefdd236336c834fb842ab132ee66d0d (diff)
downloadmtk-20170518-28a93eed3c125d4aef983cca05c56f93d484fa5d.zip
mtk-20170518-28a93eed3c125d4aef983cca05c56f93d484fa5d.tar.gz
mtk-20170518-28a93eed3c125d4aef983cca05c56f93d484fa5d.tar.bz2
6in4: fix local address detection on ppp links (#7728)
SVN-Revision: 22605
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 5e416ee..a119138 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