Skip to content

Commit

Permalink
datapath: Fix up vxlan device flags
Browse files Browse the repository at this point in the history
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: 1436564 ("datapath: get rid of redundant vxlan_dev.flags")
Signed-off-by: Greg Rose <[email protected]>
Signed-off-by: Andy Zhou <[email protected]>
  • Loading branch information
gvrose8192 authored and azhou-nicira committed Sep 22, 2017
1 parent cfb9880 commit 893fd5d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion datapath/vport-vxlan.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 893fd5d

Please sign in to comment.