Skip to content

Commit

Permalink
bgpd: Include structure when removing End.DT46 SID
Browse files Browse the repository at this point in the history
Include SID structure information when removing an SRv6 End.DT46 SID
from the forwarding plane.

Signed-off-by: Carmine Scarpitta <[email protected]>
(cherry picked from commit 1587169)

# Conflicts:
#	bgpd/bgp_mplsvpn.c
  • Loading branch information
cscarpitta authored and mergify[bot] committed Oct 7, 2024
1 parent c01e13f commit b8ff464
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion bgpd/bgp_mplsvpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,11 @@ void vpn_leak_zebra_vrf_sid_withdraw_per_af(struct bgp *bgp, afi_t afi)
void vpn_leak_zebra_vrf_sid_withdraw_per_vrf(struct bgp *bgp)
{
int debug = BGP_DEBUG(vpn, VPN_LEAK_LABEL);
<<<<<<< HEAD
=======
struct srv6_sid_ctx ctx = {};
struct seg6local_context seg6localctx = {};
>>>>>>> 1587169214 (bgpd: Include structure when removing End.DT46 SID)

if (bgp->vrf_id == VRF_UNKNOWN) {
if (debug)
Expand All @@ -546,9 +551,18 @@ void vpn_leak_zebra_vrf_sid_withdraw_per_vrf(struct bgp *bgp)
zlog_debug("%s: deleting sid for vrf %s (id=%d)", __func__,
bgp->name_pretty, bgp->vrf_id);

if (bgp->tovpn_sid_locator) {
seg6localctx.block_len =
bgp->tovpn_sid_locator->block_bits_length;
seg6localctx.node_len = bgp->tovpn_sid_locator->node_bits_length;
seg6localctx.function_len =
bgp->tovpn_sid_locator->function_bits_length;
seg6localctx.argument_len =
bgp->tovpn_sid_locator->argument_bits_length;
}
zclient_send_localsid(zclient, bgp->tovpn_zebra_vrf_sid_last_sent,
bgp->vrf_id, ZEBRA_SEG6_LOCAL_ACTION_UNSPEC,
NULL);
&seg6localctx);
XFREE(MTYPE_BGP_SRV6_SID, bgp->tovpn_zebra_vrf_sid_last_sent);
bgp->tovpn_zebra_vrf_sid_last_sent = NULL;
}
Expand Down

0 comments on commit b8ff464

Please sign in to comment.