Repository navigation
bgpd: Ignore repeated SRv6 SID Information Sub-TLVs - #23764
Open
cscarpitta wants to merge 2 commits into
Open
cscarpitta wants to merge 2 commits into
cscarpitta wants to merge 2 commits into
Conversation
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>
[Medium impact] The PR appears safe to merge, with the previous non-blocking test coverage gap still partly open. Findings
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.SummaryUpdates
Reviews (2) · Last reviewed commit: "tests: Cover repeated SRv6 SID Informati..." · Reviewed by Greptile |
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
force-pushed
the
bgp_srv6_repeated_sid_info
branch
from
October 17, 2026 16:15
e402643 to
9c27ee4
Compare
Contributor
Author
|
@greptile review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.