Skip to content

Commit

Permalink
route/link/vxlan: Fix IPv4 set_local resetting ce_mask
Browse files Browse the repository at this point in the history
rtnl_link_vxlan_set_local() removes the bit for the other IP version in
ce_mask. A missing flag inversion in the v4 part made this removal
reset all bits to 0 except the v6 one, screwing all link configuration.

Fixes: 2e68fb5

thom311#192
  • Loading branch information
Tuetuopay authored and thom311 committed Jun 25, 2018
1 parent ddfc36f commit cd5f6f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/route/link/vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ int rtnl_link_vxlan_set_local(struct rtnl_link *link, struct nl_addr *addr)
memcpy(&vxi->vxi_local, nl_addr_get_binary_addr(addr),
sizeof(vxi->vxi_local));
vxi->ce_mask |= VXLAN_ATTR_LOCAL;
vxi->ce_mask &= VXLAN_ATTR_LOCAL6;
vxi->ce_mask &= ~VXLAN_ATTR_LOCAL6;
} else if ((nl_addr_get_family(addr) == AF_INET6) &&
(nl_addr_get_len(addr) == sizeof(vxi->vxi_local6))) {
memcpy(&vxi->vxi_local6, nl_addr_get_binary_addr(addr),
Expand Down

0 comments on commit cd5f6f8

Please sign in to comment.