diff options
author | Sabrina Dubroca <sd@queasysnail.net> | 2016-06-07 11:57:22 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-06-25 15:51:51 (GMT) |
commit | 89e7effa9a584a643a437c3757f794181b2bbc5c (patch) | |
tree | 10a4157e55fb4de0f9b5625db96743134f715589 | |
parent | 9702bb14ffb237af7c430f4699ff97e4909f6e9a (diff) | |
download | libnl-89e7effa9a584a643a437c3757f794181b2bbc5c.zip libnl-89e7effa9a584a643a437c3757f794181b2bbc5c.tar.gz libnl-89e7effa9a584a643a437c3757f794181b2bbc5c.tar.bz2 |
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>
-rw-r--r-- | lib/route/link/vxlan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/route/link/vxlan.c b/lib/route/link/vxlan.c index fd57351..6f854e2 100644 --- a/lib/route/link/vxlan.c +++ b/lib/route/link/vxlan.c @@ -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 *b = link_b->l_info; 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) |