mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-24 01:01:52 +02:00
[package] 6to4: fix ifname resolving for adv_interface option (#11796)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32576 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
2bd97dd89a
commit
9253d87a21
@ -8,7 +8,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=6to4
|
||||
PKG_VERSION:=9
|
||||
PKG_VERSION:=10
|
||||
PKG_RELEASE:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
@ -143,7 +143,6 @@ proto_6to4_setup() {
|
||||
|
||||
uci_revert_state radvd
|
||||
config_load radvd
|
||||
config_load network
|
||||
|
||||
adv_subnet=$((0x${adv_subnet:-1}))
|
||||
|
||||
@ -151,9 +150,8 @@ proto_6to4_setup() {
|
||||
|
||||
for adv_interface in ${adv_interface:-lan}; do
|
||||
local adv_ifname
|
||||
config_get adv_ifname "${adv_interface:-lan}" ifname
|
||||
network_get_device adv_ifname "${adv_interface:-lan}" || continue
|
||||
|
||||
grep -qs "^ *$adv_ifname:" /proc/net/dev && {
|
||||
local subnet6="$(printf "%s:%x::1/64" "$prefix6" $adv_subnet)"
|
||||
|
||||
logger -t "$link" " * Advertising IPv6 subnet $subnet6 on ${adv_interface:-lan} ($adv_ifname)"
|
||||
@ -166,7 +164,6 @@ proto_6to4_setup() {
|
||||
|
||||
adv_subnets="${adv_subnets:+$adv_subnets }$adv_ifname:$subnet6"
|
||||
adv_subnet=$(($adv_subnet + 1))
|
||||
}
|
||||
done
|
||||
|
||||
uci_set_state network "$cfg" adv_subnets "$adv_subnets"
|
||||
|
Loading…
Reference in New Issue
Block a user