summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_vxlan.c
diff options
context:
space:
mode:
authorChirag Shah <chirag@nvidia.com>2023-06-27 00:29:59 +0200
committerChirag Shah <chirag@nvidia.com>2023-06-27 02:59:16 +0200
commita7d77ee58bdcc7dfaccfb124d94f738f2b2b4696 (patch)
tree5145bf30c9f3ade82715885cd9fc5a50bdaf88bd /zebra/zebra_vxlan.c
parentMerge pull request #13804 from LabNConsulting/aceelindem/ospf6d-config-callbacks (diff)
downloadfrr-a7d77ee58bdcc7dfaccfb124d94f738f2b2b4696.tar.xz
frr-a7d77ee58bdcc7dfaccfb124d94f738f2b2b4696.zip
zebra: fix evpn rmac nh list cmp function
EVPN RMAC (Router MAC) nexthop list compare function needs to return all values so the list element can be compared and added/deleted properly. Ticket:#3486989 Testing Done: Originate EVPN Type-5 route with PIP IP and MAC as remote nexthops. Change the PIP IP address which triggers nexthop change. Before fix: When PIP IP changes RMAC is deleted from remote VTEPs. TORS1# show evpn next-hops vni 4001 | include 00:02:00:00:00:2d 27.0.0.11 00:02:00:00:00:2d TORS1# show evpn rmac vni 4001 | include 00:02:00:00:00:2d 00:02:00:00:00:2d 27.0.0.11 ----- Remote VTEP change nexthop IP to 172.16.16.16 ----- TORS1# show evpn next-hops vni 4001 | include 00:02:00:00:00:2d 172.16.16.16 00:02:00:00:00:2d TORS1# show evpn rmac vni 4001 | include 00:02:00:00:00:2d TORS1# After fix: RMAC is retained as its nexthop list is not empty, thus it is not deleted from remote VTEPs. TORS1# show evpn rmac vni 4001 | include 00:02:00:00:00:2d 00:02:00:00:00:2d 172.16.16.16 Log: 2023/06/27 00:50:36.833474 ZEBRA: [XREH0-ZYMH6] L3VNI 4001 Remote VTEP change(27.0.0.11 -> 172.16.16.16) for RMAC 00:02:00:00:00:2d Signed-off-by: Chirag Shah <chirag@nvidia.com>
Diffstat (limited to '')
-rw-r--r--zebra/zebra_vxlan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index babd93ab2..132862e69 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -194,7 +194,7 @@ static int l3vni_rmac_nh_list_cmp(void *p1, void *p2)
const struct ipaddr *vtep_ip1 = p1;
const struct ipaddr *vtep_ip2 = p2;
- return !ipaddr_cmp(vtep_ip1, vtep_ip2);
+ return ipaddr_cmp(vtep_ip1, vtep_ip2);
}
static void l3vni_rmac_nh_free(struct ipaddr *vtep_ip)