Commit ef244c3a4c for frr
commit ef244c3a4cec5ab0700be469c09ac593e3e2c797
Author: Carmine Scarpitta <cscarpit@cisco.com>
Date: Sun Jun 28 10:45:14 2026 +0200
bgpd: Encode SRv6 L3 service attr in EVPN updates
When bgpd advertises an EVPN Type-5 route for an SRv6 L3VPN route, the
route must carry the SRv6 Service SID. The remote PE uses this SID to
install the route with the correct SRv6 forwarding behavior.
bgpd stored the SID in the route attributes, but did not include it when
building the outgoing EVPN update.
Encode the SRv6 L3 service attribute for EVPN updates as well, so remote
PEs receive the SID with the Type-5 route.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index 23bd6185f1..3ceecb9830 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -5942,10 +5942,11 @@ bgp_size_t bgp_packet_attribute(struct bgp *bgp, struct peer *peer, struct strea
}
/* SRv6 Service Information Attribute. */
- if ((afi == AFI_IP || afi == AFI_IP6)) {
+ if ((afi == AFI_IP || afi == AFI_IP6 || afi == AFI_L2VPN)) {
struct bgp_attr_srv6_l3service *srv6_l3service = NULL;
- if (safi == SAFI_MPLS_VPN && bgp_attr_get_srv6_l3service(attr))
+ if ((safi == SAFI_MPLS_VPN || safi == SAFI_EVPN) &&
+ bgp_attr_get_srv6_l3service(attr))
srv6_l3service = bgp_attr_get_srv6_l3service(attr);
else if (peer_af_flag_check(peer, afi, safi,
PEER_FLAG_CONFIG_ENCAPSULATION_SRV6_RELAX) ||