summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-07-05 00:52:10 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-07-05 00:52:10 +0000
commit8aba9a00dc86253f48d878445010cfa68b777b6a (patch)
tree997bfac02a6448c050f59b08e6e25734f4793da8
parent7c3bbe150ab3e9ec3bdd9e25f8c9e05da5a2ab1b (diff)
downloadmtk-20170518-8aba9a00dc86253f48d878445010cfa68b777b6a.zip
mtk-20170518-8aba9a00dc86253f48d878445010cfa68b777b6a.tar.gz
mtk-20170518-8aba9a00dc86253f48d878445010cfa68b777b6a.tar.bz2
6in4, 6to4: prevent starting the tunnel if kmod-sit is not yet loaded (#9643)
SVN-Revision: 27449
-rw-r--r--package/6in4/Makefile4
-rw-r--r--package/6in4/files/6in4.hotplug5
-rw-r--r--package/6to4/Makefile2
-rw-r--r--package/6to4/files/6to4.hotplug5
4 files changed, 13 insertions, 3 deletions
diff --git a/package/6in4/Makefile b/package/6in4/Makefile
index 9a2cfe2..14b7eac 100644
--- a/package/6in4/Makefile
+++ b/package/6in4/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2010 OpenWrt.org
+# Copyright (C) 2010-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=6in4
PKG_VERSION:=9
-PKG_RELEASE:=1
+PKG_RELEASE:=2
include $(INCLUDE_DIR)/package.mk
diff --git a/package/6in4/files/6in4.hotplug b/package/6in4/files/6in4.hotplug
index 49667a8..9df9934 100644
--- a/package/6in4/files/6in4.hotplug
+++ b/package/6in4/files/6in4.hotplug
@@ -20,6 +20,11 @@ if [ "$ACTION" = ifup ]; then
local wanip=$(find_6in4_wanip "$wandev")
[ -n "$wanip" ] && {
+ lsmod | grep -q ^sit || {
+ logger -t 6in4-update "Tunneling driver not loaded yet, deferring action"
+ exit 0
+ }
+
local tunnelid
config_get tunnelid "$cfg" tunnelid
diff --git a/package/6to4/Makefile b/package/6to4/Makefile
index 77082a4..f4831a4 100644
--- a/package/6to4/Makefile
+++ b/package/6to4/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=6to4
PKG_VERSION:=5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
include $(INCLUDE_DIR)/package.mk
diff --git a/package/6to4/files/6to4.hotplug b/package/6to4/files/6to4.hotplug
index 037abd4..1e3d26c 100644
--- a/package/6to4/files/6to4.hotplug
+++ b/package/6to4/files/6to4.hotplug
@@ -20,6 +20,11 @@ if [ "$ACTION" = ifup ]; then
local wanip=$(find_6to4_wanip "$wandev")
[ -n "$wanip" ] && {
+ lsmod | grep -q ^sit || {
+ logger -t 6to4 "Tunneling driver not loaded yet, deferring action"
+ exit 0
+ }
+
uci_set_state network "$cfg" ipaddr "$wanip"
( ifup "$cfg" )&
}