Skip to content

bgpd: Ignore repeated SRv6 SID Information Sub-TLVs - #23764

Open
cscarpitta wants to merge 2 commits into
FRRouting:masterfrom
cscarpitta:bgp_srv6_repeated_sid_info
Open

cscarpitta wants to merge 2 commits into
FRRouting:masterfrom
cscarpitta:bgp_srv6_repeated_sid_info

Conversation

@cscarpitta

Copy link
Copy Markdown
Contributor

RFC 9252 says that when multiple SID Information Sub-TLVs are present, the ingress PE SHOULD use the SID from the first instance and ignore subsequent ones.

The parser currently treats a subsequent SID Information Sub-TLV as a malformed Prefix-SID attribute, contrary to RFC 9252.

Fix this by ignoring subsequent SID Information Sub-TLVs after the first SID has been processed, aligning the parser with RFC 9252.

RFC 9252 says that when multiple SID Information Sub-TLVs are
present, the ingress PE SHOULD use the SID from the first instance
and ignore subsequent ones.

The parser currently treats a subsequent SID Information Sub-TLV as
a malformed Prefix-SID attribute, contrary to RFC 9252.

Fix this by ignoring subsequent SID Information Sub-TLVs after the
first SID has been processed, aligning the parser with RFC 9252.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
@frrbot frrbot Bot added bgp tests Topotests, make check, etc labels Oct 17, 2026
@greptile-apps

greptile-apps Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with the previous non-blocking test coverage gap still partly open.

Findings

  1. P2 Test misses the changed check ▶
Fix with agent prompt
### Issue 1
tests/bgpd/test_mp_attr.c:954-958
The new fixture repeats outer SRv6 L3 Service TLVs, not SID Information Sub-TLVs within one service TLV. `bgp_attr_prefix_sid` already skips the second outer TLV, so this test never reaches the changed duplicate check and would pass without this fix.

Put both SID Information Sub-TLVs inside one service TLV and check the retained SID and endpoint behavior. `SHOULD_PARSE` alone does not prove that the first SID wins.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Updates bgp_attr_srv6_service to skip a repeated SID Information Sub-TLV instead of reporting a malformed attribute.

  • BGP keeps the first SID when a service repeats SID information.

Reviews (2) · Last reviewed commit: "tests: Cover repeated SRv6 SID Informati..." · Reviewed by Greptile

Comment thread tests/bgpd/test_mp_attr.c Outdated
Add a Prefix-SID test with repeated SRv6 SID Information Sub-TLVs and
verify that the parser accepts the first instance and ignores all
others.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
@cscarpitta
cscarpitta force-pushed the bgp_srv6_repeated_sid_info branch from e402643 to 9c27ee4 Compare October 17, 2026 16:15
@cscarpitta

Copy link
Copy Markdown
Contributor Author

@greptile review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bgp master size/M tests Topotests, make check, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant