6in4: fix local address detection on ppp links (#7728)

SVN-Revision: 22605
master
Jo-Philipp Wich 14 years ago
parent 2d175dcdce
commit 28a93eed3c
  1. 2
      package/6in4/Makefile
  2. 4
      package/6in4/files/6in4.sh

@ -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

@ -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

Loading…
Cancel
Save