6in4, 6to4: prevent starting the tunnel if kmod-sit is not yet loaded (#9643)
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 5 Jul 2011 00:52:10 +0000 (00:52 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 5 Jul 2011 00:52:10 +0000 (00:52 +0000)
SVN-Revision: 27449

package/6in4/Makefile
package/6in4/files/6in4.hotplug
package/6to4/Makefile
package/6to4/files/6to4.hotplug

index 9a2cfe20d29296ff12c1fc1c558b4e6237480aba..14b7eac8165f0d7da5762e74a7e2be1c0556a0b7 100644 (file)
@@ -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
 
index 49667a815e1caa1a9aaf5b91b4eb8cbedb91880f..9df993498a1f6ae5fad21e37687d50ff90674473 100644 (file)
@@ -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
 
index 77082a4a046ca88b88e2f63be0b097db8c13d56e..f4831a49057c0f144e0e4c2d92b5b789dc468e9c 100644 (file)
@@ -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
 
index 037abd48f5b3b1096c61dbcfd021285a1ab56d68..1e3d26c418843cfd763d3ef50958d43f020edd6c 100644 (file)
@@ -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" )&
                }