aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/ipv6
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2017-01-12 09:53:32 +0100
committerHans Dedecker <dedeckeh@gmail.com>2017-01-12 11:41:11 +0100
commitbb8e9c51ab457b0bc010b47ceeab8c0e4f0d6a67 (patch)
tree49c4172a3765f7713849ca3820c5400eda867bde /package/network/ipv6
parent1ad30be982e953a36e4677d3022248a962f039b9 (diff)
downloadupstream-bb8e9c51ab457b0bc010b47ceeab8c0e4f0d6a67.tar.gz
upstream-bb8e9c51ab457b0bc010b47ceeab8c0e4f0d6a67.tar.bz2
upstream-bb8e9c51ab457b0bc010b47ceeab8c0e4f0d6a67.zip
map: delete map-t device when tearing down map interface
Delete the map-t device when tearing down the map-t interface; as such there's no conflict when the map-t interface comes up again when trying to add the map-t device as the map-t device was still present (Can not add: device 'map-wan6_4' already exists!). Only call ifdown in teardown for map-e and lw6o4 map interfaces types in order to suppress the trace "wan6_4 (6652): Interface wan6_4_ not found" Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'package/network/ipv6')
-rw-r--r--package/network/ipv6/map/Makefile2
-rwxr-xr-xpackage/network/ipv6/map/files/map.sh12
2 files changed, 12 insertions, 2 deletions
diff --git a/package/network/ipv6/map/Makefile b/package/network/ipv6/map/Makefile
index 8cc1afeda1..9e51c40531 100644
--- a/package/network/ipv6/map/Makefile
+++ b/package/network/ipv6/map/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=map
PKG_VERSION:=4
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
diff --git a/package/network/ipv6/map/files/map.sh b/package/network/ipv6/map/files/map.sh
index 98a493dd57..fe872828c3 100755
--- a/package/network/ipv6/map/files/map.sh
+++ b/package/network/ipv6/map/files/map.sh
@@ -192,7 +192,17 @@ proto_map_setup() {
proto_map_teardown() {
local cfg="$1"
- ifdown "${cfg}_"
+ local link="map-$cfg"
+
+ json_get_var type type
+
+ [ -z "$type" ] && type="map-e"
+
+ case "$type" in
+ "map-e"|"lw4o6") ifdown "${cfg}_" ;;
+ "map-t") [ -f "/proc/net/nat46/control" ] && echo del $link > /proc/net/nat46/control ;;
+ esac
+
rm -f /tmp/map-$cfg.rules
}