mirror of
https://gitee.com/openharmony/third_party_libnl
synced 2024-11-24 02:29:50 +00:00
route/link/vxlan: Fix IPv4 set_local resetting ce_mask
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: 2e68fb5b02
https://github.com/thom311/libnl/pull/192
This commit is contained in:
parent
ddfc36f46e
commit
cd5f6f8429
@ -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),
|
memcpy(&vxi->vxi_local, nl_addr_get_binary_addr(addr),
|
||||||
sizeof(vxi->vxi_local));
|
sizeof(vxi->vxi_local));
|
||||||
vxi->ce_mask |= VXLAN_ATTR_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) &&
|
} else if ((nl_addr_get_family(addr) == AF_INET6) &&
|
||||||
(nl_addr_get_len(addr) == sizeof(vxi->vxi_local6))) {
|
(nl_addr_get_len(addr) == sizeof(vxi->vxi_local6))) {
|
||||||
memcpy(&vxi->vxi_local6, nl_addr_get_binary_addr(addr),
|
memcpy(&vxi->vxi_local6, nl_addr_get_binary_addr(addr),
|
||||||
|
Loading…
Reference in New Issue
Block a user