Add connection tracking mark support.
[cascardo/ovs.git] / utilities / ovs-docker
index 12c3246..43cea54 100755 (executable)
@@ -86,6 +86,10 @@ add_port () {
                 GATEWAY=`expr X"$1" : 'X[^=]*=\(.*\)'`
                 shift
                 ;;
+            --mtu=*)
+                MTU=`expr X"$1" : 'X[^=]*=\(.*\)'`
+                shift
+                ;;
             *)
                 echo >&2 "$UTIL add-port: unknown option \"$1\""
                 exit 1
@@ -137,6 +141,10 @@ add_port () {
     ip netns exec "$PID" ip link set dev "${PORTNAME}_c" name "$INTERFACE"
     ip netns exec "$PID" ip link set "$INTERFACE" up
 
+    if [ -n "$MTU" ]; then
+        ip netns exec "$PID" ip link set dev "$INTERFACE" mtu "$MTU"
+    fi
+
     if [ -n "$ADDRESS" ]; then
         ip netns exec "$PID" ip addr add "$ADDRESS" dev "$INTERFACE"
     fi
@@ -216,14 +224,15 @@ usage: ${UTIL} COMMAND
 Commands:
   add-port BRIDGE INTERFACE CONTAINER [--ipaddress="ADDRESS"]
                     [--gateway=GATEWAY] [--macaddress="MACADDRESS"]
+                    [--mtu=MTU]
                     Adds INTERFACE inside CONTAINER and connects it as a port
                     in Open vSwitch BRIDGE. Optionally, sets ADDRESS on
                     INTERFACE. ADDRESS can include a '/' to represent network
-                    prefix length. Optionally, sets a GATEWAY and a MACADDRESS.
-                    e.g.:
+                    prefix length. Optionally, sets a GATEWAY, MACADDRESS
+                    and MTU.  e.g.:
                     ${UTIL} add-port br-int eth1 c474a0e2830e
                     --ipaddress=192.168.1.2/24 --gateway=192.168.1.1
-                    --macaddress="a2:c3:0d:49:7f:f8"
+                    --macaddress="a2:c3:0d:49:7f:f8" --mtu=1450
   del-port BRIDGE INTERFACE CONTAINER
                     Deletes INTERFACE inside CONTAINER and removes its
                     connection to Open vSwitch BRIDGE. e.g.: