summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_mplsvpn.c
diff options
context:
space:
mode:
authorCarmine Scarpitta <cscarpit@cisco.com>2024-09-15 18:56:21 +0200
committerCarmine Scarpitta <cscarpit@cisco.com>2024-09-15 21:35:10 +0200
commita764fb9bd8e703eb6ea45ce40d67e4c503823286 (patch)
treed126d813653e0786aa9b895e487ba3fe0d8948cb /bgpd/bgp_mplsvpn.c
parentbgpd: Include structure when installing End.DT46 SID (diff)
downloadfrr-a764fb9bd8e703eb6ea45ce40d67e4c503823286.tar.xz
frr-a764fb9bd8e703eb6ea45ce40d67e4c503823286.zip
bgpd: Include structure when removing End.DT4/6 SID
Include SID structure information when removing an SRv6 End.DT4 or End.DT6 SID from the forwarding plane. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Diffstat (limited to 'bgpd/bgp_mplsvpn.c')
-rw-r--r--bgpd/bgp_mplsvpn.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c
index 80a2de5f9..8efa55fb7 100644
--- a/bgpd/bgp_mplsvpn.c
+++ b/bgpd/bgp_mplsvpn.c
@@ -493,6 +493,7 @@ void vpn_leak_zebra_vrf_sid_withdraw_per_af(struct bgp *bgp, afi_t afi)
{
int debug = BGP_DEBUG(vpn, VPN_LEAK_LABEL);
struct srv6_sid_ctx ctx = {};
+ struct seg6local_context seg6localctx = {};
if (bgp->vrf_id == VRF_UNKNOWN) {
if (debug)
@@ -505,9 +506,22 @@ void vpn_leak_zebra_vrf_sid_withdraw_per_af(struct bgp *bgp, afi_t afi)
zlog_debug("%s: deleting sid for vrf %s afi (id=%d)", __func__,
bgp->name_pretty, bgp->vrf_id);
+ if (bgp->vpn_policy[afi].tovpn_sid_locator) {
+ seg6localctx.block_len =
+ bgp->vpn_policy[afi].tovpn_sid_locator->block_bits_length;
+ seg6localctx.node_len =
+ bgp->vpn_policy[afi].tovpn_sid_locator->node_bits_length;
+ seg6localctx.function_len =
+ bgp->vpn_policy[afi]
+ .tovpn_sid_locator->function_bits_length;
+ seg6localctx.argument_len =
+ bgp->vpn_policy[afi]
+ .tovpn_sid_locator->argument_bits_length;
+ }
zclient_send_localsid(zclient,
- bgp->vpn_policy[afi].tovpn_zebra_vrf_sid_last_sent,
- bgp->vrf_id, ZEBRA_SEG6_LOCAL_ACTION_UNSPEC, NULL);
+ bgp->vpn_policy[afi].tovpn_zebra_vrf_sid_last_sent,
+ bgp->vrf_id, ZEBRA_SEG6_LOCAL_ACTION_UNSPEC,
+ &seg6localctx);
XFREE(MTYPE_BGP_SRV6_SID,
bgp->vpn_policy[afi].tovpn_zebra_vrf_sid_last_sent);
bgp->vpn_policy[afi].tovpn_zebra_vrf_sid_last_sent = NULL;