diff mbox

[ovs-dev,2/4] system-common-macros: Add macros to create IPv6 tunnels

Message ID 20170607235427.15324-3-e@erig.me
State Accepted
Delegated to: Joe Stringer
Headers show

Commit Message

Eric Garver June 7, 2017, 11:54 p.m. UTC
Add simple macros to wrap existing tunnel create macros, but lowers the
MTU enough to allow IPv6 underlay.

Signed-off-by: Eric Garver <e@erig.me>
---
 tests/system-common-macros.at | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
diff mbox

Patch

diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at
index f45463ab6957..8de356dcd63e 100644
--- a/tests/system-common-macros.at
+++ b/tests/system-common-macros.at
@@ -178,6 +178,16 @@  m4_define([ADD_OVS_TUNNEL],
    ]
 )
 
+# ADD_OVS_TUNNEL6([type], [bridge], [port], [remote-addr], [overlay-addr])
+#
+# Same as ADD_OVS_TUNNEL, but drops MTU enough for the IPv6 underlay.
+#
+m4_define([ADD_OVS_TUNNEL6],
+   [ADD_OVS_TUNNEL([$1], [$2], [$3], [$4], [$5])
+    AT_CHECK([ip link set dev $2 mtu 1430])
+   ]
+)
+
 # ADD_NATIVE_TUNNEL([type], [port], [namespace], [remote-addr], [overlay-addr],
 #                   [type-args], [link-args])
 #
@@ -199,6 +209,17 @@  m4_define([ADD_NATIVE_TUNNEL],
    ]
 )
 
+# ADD_NATIVE_TUNNEL6([type], [port], [namespace], [remote-addr], [overlay-addr],
+#                   [type-args], [link-args])
+#
+# Same as ADD_NATIVE_TUNNEL, but drops MTU enough for the IPv6 underlay.
+#
+m4_define([ADD_NATIVE_TUNNEL6],
+   [ADD_NATIVE_TUNNEL([$1], [$2], [$3], [$4], [$5], [$6], [$7])
+    NS_CHECK_EXEC([$3], [ip link set dev $2 mtu 1430])
+   ]
+)
+
 # FORMAT_PING([])
 #
 # Strip variant pieces from ping output so the output can be reliably compared.