xenserver: Remove ip_gre kernel module when other modules are removed
[openvswitch] / xenserver / etc_init.d_vswitch
index 7299430b8db900f130fb9859202c85271ecdfba5..18dd7bc69663f3fae3a14e0369a7e1b55237878e 100755 (executable)
@@ -104,6 +104,9 @@ function remove_modules {
     if lsmod | grep -q "openvswitch_mod"; then
         action "Removing openvswitch module" rmmod openvswitch_mod.ko
     fi
+    if lsmod | grep -q "ip_gre_mod"; then
+        action "Removing ip_gre module" rmmod ip_gre_mod.ko
+    fi
 }
 
 function reload_vswitchd {
@@ -261,6 +264,9 @@ function start {
     # ovs-vswitchd needs a few per bridge
     ulimit -n 4096
 
+    # Allow GRE traffic.
+    iptables -I INPUT -p gre -j ACCEPT
+
     if [ ! -e "$VSWITCHD_CONF" ]; then
         warning "$VSWITCHD_CONF does not exist"
         action "Creating empty $VSWITCHD_CONF" touch "$VSWITCHD_CONF"