Skip to content

Commit

Permalink
Merge pull request #16491 from opensourcerouting/fix/crash_bgp_auto_vrf
Browse files Browse the repository at this point in the history
bgpd: Do not process VRF import/export to/from auto created VRF instances
  • Loading branch information
donaldsharp authored Jul 28, 2024
2 parents 7ac16c9 + 04f9372 commit 593677b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions bgpd/bgp_mplsvpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -3734,6 +3734,9 @@ void vpn_leak_postchange_all(void)
if (bgp->inst_type != BGP_INSTANCE_TYPE_VRF)
continue;

if (CHECK_FLAG(bgp->vrf_flags, BGP_VRF_AUTO))
continue;

vpn_leak_postchange(
BGP_VPN_POLICY_DIR_TOVPN,
AFI_IP,
Expand All @@ -3753,6 +3756,9 @@ void vpn_leak_postchange_all(void)
if (bgp->inst_type != BGP_INSTANCE_TYPE_VRF)
continue;

if (CHECK_FLAG(bgp->vrf_flags, BGP_VRF_AUTO))
continue;

vpn_leak_postchange(
BGP_VPN_POLICY_DIR_FROMVPN,
AFI_IP,
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -1703,7 +1703,7 @@ DEFUN (no_router_bgp,
continue;

if (CHECK_FLAG(tmp_bgp->vrf_flags, BGP_VRF_AUTO))
continue;
bgp_delete(tmp_bgp);

if (CHECK_FLAG(
tmp_bgp->af_flags[AFI_IP]
Expand Down

0 comments on commit 593677b

Please sign in to comment.