]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: fix label lost when vrf loopback comes back
authorLoïc Sang <loic.sang@6wind.com>
Tue, 16 Jul 2024 12:03:11 +0000 (14:03 +0200)
committerLoïc Sang <loic.sang@6wind.com>
Wed, 17 Jul 2024 13:41:39 +0000 (15:41 +0200)
commit8b81f32e97876eefe13370d1efba6a7aeb1c6771
tree4fca0922d3508c2585972741a1601a2141cbd8fe
parentcc3519f3e6eaa06f762e0d447202df32df66e129
bgpd: fix label lost when vrf loopback comes back

VRF-label association drops when the VRF loopback goes down, however, it
does not return once the interface is enabled again.

Logs show that when VRF loopback goes down, a label drop message is sent
to zebra and immediately resent label installation to zebra, trigged by
"vpn_leak_postchange_all()":
2024/07/16 13:26:29 BGP: [RVJ1J-J2T22] ifp down r1-cust1 vrf id 7
2024/07/16 13:26:29 BGP: [WA2QY-06STJ] vpn_leak_zebra_vrf_label_withdraw: deleting label for vrf VRF r1-cust1 (id=7)
2024/07/16 13:26:30 BGP: [S82AC-6YAC8] vpn_leak_zebra_vrf_label_update: vrf VRF r1-cust1: afi IPv4: setting label 80 for vrf id 7

Since the interface is down, the netlink message is not send to kernel.
Once the interface comes back, zebra ignore the installation assuming
the label is already seen.

To fix this, add a check for the interface status before attempting to
reinstall the label.

Signed-off-by: Loïc Sang <loic.sang@6wind.com>
bgpd/bgp_mplsvpn.c