diff mbox series

[ovs-dev,38/41] tunnel: add support for erspan and ip6erspan type.

Message ID 1526591733-4450-39-git-send-email-gvrose8192@gmail.com
State Superseded
Headers show
Series Add ERSPAN support | expand

Commit Message

Gregory Rose May 17, 2018, 9:15 p.m. UTC
From: William Tu <u9012063@gmail.com>

This patch adds support for erspan and ip6erspan.

Signed-off-by: William Tu <u9012063@gmail.com>
---
 lib/odp-util.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/odp-util.c b/lib/odp-util.c
index 29b5fb8..acc1586 100644
--- a/lib/odp-util.c
+++ b/lib/odp-util.c
@@ -2885,7 +2885,8 @@  tun_key_to_attr(struct ofpbuf *a, const struct flow_tnl *tun_key,
         nl_msg_end_nested(a, vxlan_opts_ofs);
     }
     tun_metadata_to_geneve_nlattr(tun_key, tun_flow_key, key_buf, a);
-    if (tun_key->erspan_ver) {
+    if (!tnl_type || !strcmp(tnl_type, "erspan") ||
+        !strcmp(tnl_type, "ip6erspan")) {
         struct erspan_metadata opts;
 
         opts.version = tun_key->erspan_ver;