diff options
| author | Carmine Scarpitta <cscarpit@cisco.com> | 2024-09-15 18:56:48 +0200 |
|---|---|---|
| committer | Carmine Scarpitta <cscarpit@cisco.com> | 2024-10-23 17:25:16 +0200 |
| commit | 88320c88e5a6bd60b998767b9bd7f83b51fce0fa (patch) | |
| tree | 148f7e2c77d611f51b1709ee9f105bb397a8b509 /bgpd/bgp_mplsvpn.c | |
| parent | 29caedcda681bf8a897057a4a63acb01ae1799a7 (diff) | |
bgpd: Include structure when removing End.DT46 SID
Include SID structure information when removing an SRv6 End.DT46 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.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 7b6811a1a1..bd95e16901 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -517,6 +517,7 @@ 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); + struct seg6local_context seg6localctx = {}; if (bgp->vrf_id == VRF_UNKNOWN) { if (debug) @@ -530,9 +531,14 @@ 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); - zclient_send_localsid(zclient, bgp->tovpn_zebra_vrf_sid_last_sent, - bgp->vrf_id, ZEBRA_SEG6_LOCAL_ACTION_UNSPEC, - NULL); + 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, &seg6localctx); XFREE(MTYPE_BGP_SRV6_SID, bgp->tovpn_zebra_vrf_sid_last_sent); bgp->tovpn_zebra_vrf_sid_last_sent = NULL; } |
