Commit 10c718b310 for frr
commit 10c718b3105b152923592324b94803952dd54283
Author: Louis Scalbert <louis.scalbert@6wind.com>
Date: Thu Nov 5 11:40:05 2026 +0100
bgpd: remove dead repeated SRv6 SID Information check
4453dc466f ("bgpd: rename srv6_l3_service srv6_service") was supposed to
only do renaming but due a rebasing mistake, it has reverted the change
from 50c18cbe11 ("bgpd: Ignore repeated SRv6 SID Information Sub-TLVs").
Surprisingly, the test from 51c50deded ("tests: Cover repeated SRv6 SID
Information Sub-TLVs") is still passing. It was supposed to test what
was reverted so it should have passed.
After analysis, it appears that:
- 50c18cbe11 commit fixes nothing. The previous code already handles
that case. It is confirmed by fuzzing with bgp_injector.py from
bgp_prefix_sid_evpn topotest on pre a 50c18cbe11 binary. The pcap
captures showed that r1 advertises two SRv6 service sub-tlv to r2
and r2 re-advertised only the first one to r3).
- 51c50deded only checks that the parser code is returning no error,
not that it actually ignores the second sub-TLV.
Only remove dead codes. Do not re-apply 50c18cbe11 commit.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index f5f9d563c3..e110a95d8f 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -3911,19 +3911,6 @@ static enum bgp_attr_parse_ret bgp_attr_srv6_service(struct bgp_attr_parser_args
&ipv6_sid, sid_flags, endpoint_behavior);
/* Configure from Info */
- if (psid_type == BGP_PREFIX_SID_SRV6_L2_SERVICE)
- srv6_service = bgp_attr_get_srv6_l2service(attr);
- else
- srv6_service = bgp_attr_get_srv6_l3service(attr);
-
- if (srv6_service) {
- flog_err(EC_BGP_ATTRIBUTE_REPEATED,
- "Prefix SID SRv6 L%s Service field repeated",
- psid_type == BGP_PREFIX_SID_SRV6_L2_SERVICE ? "2" : "3");
- return bgp_attr_malformed(
- args, BGP_NOTIFY_UPDATE_MAL_ATTR, args->total);
- }
-
srv6_service = XCALLOC(MTYPE_BGP_SRV6_SERVICE,
sizeof(struct bgp_attr_srv6_service));