[ovs-dev,12/15] datapath: Fix up vxlan device flags

Message ID 1505152570-6143-12-git-send-email-gvrose8192@gmail.com
State New
Headers show
Series
  • [ovs-dev,01/15] acinclude: Check for SKB_GSO_UDP
Related show

Commit Message

Greg Rose Sept. 11, 2017, 5:56 p.m.
I missed a couple of usages of the flags parameter from vxlan_dev
while adding compatibility code to handle the removal of the flags.
Add the checks so that the module can compile for Linux kernel
release 4.13

Fixes: 143656435c ("datapath: get rid of redundant vxlan_dev.flags")
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
---
 datapath/vport-vxlan.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Patch

diff --git a/datapath/vport-vxlan.c b/datapath/vport-vxlan.c
index 2910694..c7139ab 100644
--- a/datapath/vport-vxlan.c
+++ b/datapath/vport-vxlan.c
@@ -1,5 +1,5 @@ 
 /*
- * Copyright (c) 2015 Nicira, Inc.
+ * Copyright (c) 2015,2017 Nicira, Inc.
  * Copyright (c) 2013 Cisco Systems, Inc.
  *
  * This program is free software; you can redistribute it and/or
@@ -60,14 +60,22 @@  static int vxlan_get_options(const struct vport *vport, struct sk_buff *skb)
 			return -EMSGSIZE;
 
 		nla_nest_end(skb, exts);
+#ifdef HAVE_VXLAN_DEV_CFG
+	} else if (vxlan->cfg.flags & VXLAN_F_GPE) {
+#else
 	} else if (vxlan->flags & VXLAN_F_GPE) {
+#endif
 		struct nlattr *exts;
 
 		exts = nla_nest_start(skb, OVS_TUNNEL_ATTR_EXTENSION);
 		if (!exts)
 			return -EMSGSIZE;
 
+#ifdef HAVE_VXLAN_DEV_CFG
+		if (vxlan->cfg.flags & VXLAN_F_GPE &&
+#else
 		if (vxlan->flags & VXLAN_F_GPE &&
+#endif
 		    nla_put_flag(skb, OVS_VXLAN_EXT_GPE))
 			return -EMSGSIZE;