diff mbox

[ovs-dev] dpif-netlink-rtnl: Fix VXLAN port create for regular VXLAN

Message ID 20170801224718.13133-1-e@erig.me
State Accepted
Headers show

Commit Message

Eric Garver Aug. 1, 2017, 10:47 p.m. UTC
When VXLAN-GPE was introduced we added IFLA_VXLAN_GPE to the policy
parsing, but did not mark it as optional. The kernel only returns this
netlink attribute if it's actually configured.

This also adds a missing entry for IFLA_VXLAN_GBP. Apparently we have no
system-traffic test coverage there.

Fixes: c33c412fb139 ("dpif-netlink-rtnl: Support VXLAN-GPE")
Fixes: 825e45e0109f ("dpif-netlink-rtnl: Support VXLAN creation")
Reported-by: Joe Stringer <joe@ovn.org>
Signed-off-by: Eric Garver <e@erig.me>
---
 lib/dpif-netlink-rtnl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Joe Stringer Aug. 1, 2017, 11:47 p.m. UTC | #1
On 1 August 2017 at 15:47, Eric Garver <e@erig.me> wrote:
> When VXLAN-GPE was introduced we added IFLA_VXLAN_GPE to the policy
> parsing, but did not mark it as optional. The kernel only returns this
> netlink attribute if it's actually configured.
>
> This also adds a missing entry for IFLA_VXLAN_GBP. Apparently we have no
> system-traffic test coverage there.
>
> Fixes: c33c412fb139 ("dpif-netlink-rtnl: Support VXLAN-GPE")
> Fixes: 825e45e0109f ("dpif-netlink-rtnl: Support VXLAN creation")
> Reported-by: Joe Stringer <joe@ovn.org>
> Signed-off-by: Eric Garver <e@erig.me>

Thanks for the quick fix, I applied this to master.
diff mbox

Patch

diff --git a/lib/dpif-netlink-rtnl.c b/lib/dpif-netlink-rtnl.c
index 98a2f2bddae2..83f51ac3f3b3 100644
--- a/lib/dpif-netlink-rtnl.c
+++ b/lib/dpif-netlink-rtnl.c
@@ -70,7 +70,8 @@  static const struct nl_policy vxlan_policy[] = {
     [IFLA_VXLAN_LEARNING] = { .type = NL_A_U8 },
     [IFLA_VXLAN_UDP_ZERO_CSUM6_RX] = { .type = NL_A_U8 },
     [IFLA_VXLAN_PORT] = { .type = NL_A_U16 },
-    [IFLA_VXLAN_GPE] = { .type = NL_A_FLAG },
+    [IFLA_VXLAN_GBP] = { .type = NL_A_FLAG, .optional = true },
+    [IFLA_VXLAN_GPE] = { .type = NL_A_FLAG, .optional = true },
 };
 static const struct nl_policy gre_policy[] = {
     [IFLA_GRE_COLLECT_METADATA] = { .type = NL_A_FLAG },