mirror of
https://gitee.com/openharmony/third_party_libnl
synced 2024-11-27 20:20:30 +00:00
vxlan: properly handle LOOSE_COMPARISON in ->io_compare
This lets us match links only on the attributes that have actually been set, instead of comparing all attributes. Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
9702bb14ff
commit
89e7effa9a
@ -451,7 +451,7 @@ static int vxlan_compare(struct rtnl_link *link_a, struct rtnl_link *link_b,
|
|||||||
struct vxlan_info *a = link_a->l_info;
|
struct vxlan_info *a = link_a->l_info;
|
||||||
struct vxlan_info *b = link_b->l_info;
|
struct vxlan_info *b = link_b->l_info;
|
||||||
int diff = 0;
|
int diff = 0;
|
||||||
uint32_t attrs = ~0;
|
uint32_t attrs = flags & LOOSE_COMPARISON ? b->ce_mask : ~0;
|
||||||
|
|
||||||
#define VXLAN_DIFF(ATTR, EXPR) ATTR_DIFF(attrs, VXLAN_ATTR_##ATTR, a, b, EXPR)
|
#define VXLAN_DIFF(ATTR, EXPR) ATTR_DIFF(attrs, VXLAN_ATTR_##ATTR, a, b, EXPR)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user