mirror of
https://git.openwrt.org/feed/routing.git
synced 2024-06-15 11:43:55 +02:00
Merge pull request #346 from dedeckeh/pr_nat46_xlat
nat46: harden 464xlat teardown logic
This commit is contained in:
commit
1418fce12b
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=nat46
|
||||
PKG_VERSION:=10
|
||||
PKG_VERSION:=11
|
||||
PKG_RELEASE:=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
|
|
|
@ -81,13 +81,14 @@ proto_464xlat_setup() {
|
|||
proto_464xlat_teardown() {
|
||||
local cfg="$1"
|
||||
local link="464-$cfg"
|
||||
|
||||
[ -f /tmp/464-$cfg-anycast ] || return
|
||||
local ip6addr=$(cat /tmp/464-$cfg-anycast)
|
||||
local anycast_active
|
||||
|
||||
464xlatcfg "$link"
|
||||
|
||||
rm -rf /tmp/464-$cfg-anycast
|
||||
ip -6 rule del to $ip6addr lookup prelocal
|
||||
[ -n "$ip6addr" ] && ip -6 rule del to $ip6addr lookup prelocal
|
||||
|
||||
if [ -z "$(ls /tmp/464-*-anycast 2>&-)" ]; then
|
||||
ip -6 rule del from all lookup local
|
||||
|
|
Loading…
Reference in New Issue
Block a user