From e7b3af1cbaa8e89a29eede0823ab770ead1f107e Mon Sep 17 00:00:00 2001 From: jow Date: Thu, 12 Aug 2010 10:30:05 +0000 Subject: [PATCH] [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 --- package/6in4/Makefile | 2 +- package/6in4/files/6in4.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/6in4/Makefile b/package/6in4/Makefile index 75e784882..289d28ee3 100644 --- a/package/6in4/Makefile +++ b/package/6in4/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=6in4 -PKG_VERSION:=3 +PKG_VERSION:=4 PKG_RELEASE:=1 include $(INCLUDE_DIR)/package.mk diff --git a/package/6in4/files/6in4.sh b/package/6in4/files/6in4.sh index 5e416ee0b..a119138d0 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 -- 2.20.1