ASR_BASE

Change-Id: Icf3719cc0afe3eeb3edc7fa80a2eb5199ca9dda1
diff --git a/external/subpack/net/shorewall6/files/hotplug_iface b/external/subpack/net/shorewall6/files/hotplug_iface
new file mode 100644
index 0000000..bfe2bf7
--- /dev/null
+++ b/external/subpack/net/shorewall6/files/hotplug_iface
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
+
+case "$ACTION" in
+    ifup)
+        if [ "$INTERFACE" = "lan" ]; then
+            /usr/sbin/shorewall -6 start
+	elif [ "${INTERFACE:0:3}" = "wan" ] &&
+             [ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
+	    /etc/shorewall6/state/firewall enable "$DEVICE"
+	fi
+        ;;
+    ifdown)
+	if [ "${INTERFACE:0:3}" = "wan" ]; then
+	    /etc/shorewall6/state/firewall disable "$DEVICE"
+	fi
+        ;;
+esac