From 89e7effa9a584a643a437c3757f794181b2bbc5c Mon Sep 17 00:00:00 2001 From: Sabrina Dubroca Date: Tue, 7 Jun 2016 13:57:22 +0200 Subject: [PATCH] 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 Signed-off-by: Thomas Haller --- lib/route/link/vxlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)