]> git.proxmox.com Git - mirror_frr.git/commit - zebra/zebra_vxlan.c
zebra: maintain list of nhs in rmac db
authorChirag Shah <chirag@nvidia.com>
Wed, 29 Sep 2021 02:01:16 +0000 (19:01 -0700)
committerChirag Shah <chirag@nvidia.com>
Fri, 11 Mar 2022 01:27:15 +0000 (17:27 -0800)
commitdb88997872172af52a21c8324d83640136ef2787
tree24f94be251691208d12315a74dd6ac371693bd30
parent37a9cb28abde961ef1016ee0d3afa6323734e13b
zebra: maintain list of nhs in rmac db

Keep the list of remote-vteps/nexthops in
rmac db.

Problem:
In CLAG deployment there might be a situation
where CLAG secondary sends individual ip as nexthop
along with anycast mac as RMAC. This combination
is updated in zebra's rmac cache.
Upon recovery at clag secondary sends withdrawal
of the incorrect rmac and nexthop mapping.
The RMAC entry mapping to nh is not cleaned up properly
in the zebra rmac cache.

Fix:
Zebra rmac db needs to maintain a list of nexthops.
When a bgp withdrawal for rmac to nexthop mapping
is received, remove the old nexthop from the rmac's nh
list and if the host reference still remains for
the RMAC,fall back to the nexthop one remaining in
the list.
At most you expect two nexthops mapped to RMAC
(in clag deployment).

Ticket: 2798406
Reviewed By:
Testing Done:

CLAG primary and secondary have advertise-pip enabled
advertise type-5 route (default route) with
individual IP as nh and individual svi mac as rmac.

- disable advertise pip on both clag devices, this
results in advertisement of routes with anycast ip as nh
and anycast mac as rmac.

- disable peerlink on clag primary, this triggers
clag secondary to (transitory) send bgp update with
individual ip as nh and anycast mac as rmac.

- At the remote vtep:
Check the zebra's rmac cache/nh mapping correctly
and points to anycast rmac and anycast ip as nh of the
clag system.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
zebra/zebra_evpn_mac.h
zebra/zebra_vxlan.c