diff options
| -rw-r--r-- | bgpd/bgp_evpn_vty.c | 4 | ||||
| -rw-r--r-- | bgpd/bgp_packet.c | 2 | ||||
| -rw-r--r-- | bgpd/bgpd.c | 31 | ||||
| -rw-r--r-- | lib/srv6.c | 2 |
4 files changed, 36 insertions, 3 deletions
diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c index 3e6a7ac784..d9985c9d5b 100644 --- a/bgpd/bgp_evpn_vty.c +++ b/bgpd/bgp_evpn_vty.c @@ -113,7 +113,7 @@ static void display_vrf_import_rt(struct vty *vty, struct vrf_irt_node *irt, break; case ECOMMUNITY_ENCODE_AS4: - pnt = ptr_get_be32(pnt, &eas.val); + pnt = ptr_get_be32(pnt, &eas.as); eas.val = (*pnt++ << 8); eas.val |= (*pnt++); @@ -222,7 +222,7 @@ static void display_import_rt(struct vty *vty, struct irt_node *irt, break; case ECOMMUNITY_ENCODE_AS4: - pnt = ptr_get_be32(pnt, &eas.val); + pnt = ptr_get_be32(pnt, &eas.as); eas.val = (*pnt++ << 8); eas.val |= (*pnt++); diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index db3ccef619..edef77b845 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -2746,6 +2746,8 @@ static int bgp_route_refresh_receive(struct peer_connection *connection, "%pBP rcvd Remove-All pfxlist ORF request", peer); prefix_bgp_orf_remove_all(afi, name); + peer->orf_plist[afi][safi] = prefix_bgp_orf_lookup(afi, + name); break; } diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index a984c5af87..e8440ec9c0 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -3959,6 +3959,37 @@ int bgp_delete(struct bgp *bgp) bgp_vpn_leak_unimport(bgp); +<<<<<<< HEAD +======= + /* + * Release SRv6 SIDs, like it's done in `vpn_leak_postchange()` + * and bgp_sid_vpn_export_cmd/af_sid_vpn_export_cmd commands. + */ + bgp->tovpn_sid_index = 0; + UNSET_FLAG(bgp->vrf_flags, BGP_VRF_TOVPN_SID_AUTO); + delete_vrf_tovpn_sid_per_vrf(bgp_default, bgp); + for (afi = AFI_IP; afi < AFI_MAX; afi++) { + bgp->vpn_policy[afi].tovpn_sid_index = 0; + UNSET_FLAG(bgp->vpn_policy[afi].flags, BGP_VPN_POLICY_TOVPN_SID_AUTO); + delete_vrf_tovpn_sid_per_af(bgp_default, bgp, afi); + + vpn_leak_zebra_vrf_sid_withdraw(bgp, afi); + } + + /* release auto vpn labels */ + bgp_vpn_release_label(bgp, AFI_IP, true); + bgp_vpn_release_label(bgp, AFI_IP6, true); + + /* release manual vpn labels */ + for (afi = AFI_IP; afi < AFI_MAX; afi++) { + if (!CHECK_FLAG(bgp->vpn_policy[afi].flags, BGP_VPN_POLICY_TOVPN_LABEL_MANUAL_REG)) + continue; + bgp_zebra_release_label_range(bgp->vpn_policy[afi].tovpn_label, + bgp->vpn_policy[afi].tovpn_label); + UNSET_FLAG(bgp->vpn_policy[afi].flags, BGP_VPN_POLICY_TOVPN_LABEL_MANUAL_REG); + } + +>>>>>>> d6363625c (bgpd: release manual vpn label on instance deletion) hook_call(bgp_inst_delete, bgp); FOREACH_AFI_SAFI (afi, safi) diff --git a/lib/srv6.c b/lib/srv6.c index a82103e423..18e453d4fb 100644 --- a/lib/srv6.c +++ b/lib/srv6.c @@ -75,7 +75,7 @@ const char *seg6local_context2str(char *str, size_t size, switch (action) { case ZEBRA_SEG6_LOCAL_ACTION_END: - snprintf(str, size, "USP"); + snprintf(str, size, "-"); return str; case ZEBRA_SEG6_LOCAL_ACTION_END_X: |
