Avoid inserting duplicate iptables rules when restarting vswitch.
[sliver-openvswitch.git] / debian / openvswitch-switch.init
index a65af0c..36bc208 100755 (executable)
@@ -34,11 +34,9 @@ start () {
     if test X"$FORCE_COREFILES" != X; then
        set "$@" --force-corefiles="$FORCE_COREFILES"
     fi
+    "$@" || exit $?
 
-    # Allow GRE traffic.
-    test ! -x /sbin/iptables || /sbin/iptables -I INPUT -p gre -j ACCEPT
-
-    "$@"
+    $ovs_ctl --protocol=gre enable-protocol
 }
 
 stop () {