diff options
| author | Loïc Sang <loic.sang@6wind.com> | 2024-09-03 18:36:25 +0200 |
|---|---|---|
| committer | Loïc Sang <loic.sang@6wind.com> | 2024-09-04 09:37:08 +0200 |
| commit | d173522bbfd7c5a2c01d706d23e3524f2e50beaa (patch) | |
| tree | 5a404ba4a43975c5ad53f83ea0293dd3df275797 | |
| parent | 3ae49f732c66aa8f18e085cb77f73c17980b0084 (diff) | |
bgpd: remove redundant loopback check in label update
The "if_is_vrf" check is unnecessary because it’s already handled by
"if_get_vrf_loopback". Additionally, it ignores the default loopback and
could introduce potential bugs.
Fixes: 8b81f32e9787 ("bgpd: fix label lost when vrf loopback comes back")
Signed-off-by: Loïc Sang <loic.sang@6wind.com>
| -rw-r--r-- | bgpd/bgp_mplsvpn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index f7ca51e146..ad774b2b00 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -304,7 +304,7 @@ void vpn_leak_zebra_vrf_label_update(struct bgp *bgp, afi_t afi) if (vpn_leak_to_vpn_active(bgp, afi, NULL, false)) { ifp = if_get_vrf_loopback(bgp->vrf_id); - if (ifp && if_is_vrf(ifp) && if_is_up(ifp)) + if (ifp && if_is_up(ifp)) label = bgp->vpn_policy[afi].tovpn_label; } |
