zebra: add 'no encapsulation' command under segment-routing/srv6#20716
Merged
cscarpitta merged 2 commits intoFRRouting:masterfrom Feb 7, 2026
Merged
zebra: add 'no encapsulation' command under segment-routing/srv6#20716cscarpitta merged 2 commits intoFRRouting:masterfrom
cscarpitta merged 2 commits intoFRRouting:masterfrom
Conversation
12 tasks
Greptile OverviewGreptile SummaryAdded the missing The implementation:
The change is straightforward and follows existing patterns in the codebase. The refactoring improves maintainability by eliminating code duplication. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant VTY as VTY Command Handler
participant Helper as unset_srv6_encapsulation()
participant Zebra as zebra_srv6_encap_src_addr_unset()
participant Dataplane as dplane_srv6_encap_srcaddr_set()
Note over User,Dataplane: Three commands now share the same cleanup logic
User->>VTY: no srv6
VTY->>Helper: unset_srv6_encapsulation()
Helper->>Zebra: zebra_srv6_encap_src_addr_unset()
Helper->>Dataplane: dplane_srv6_encap_srcaddr_set(&in6addr_any, NS_DEFAULT)
VTY-->>User: CMD_SUCCESS
User->>VTY: no encapsulation (NEW)
VTY->>Helper: unset_srv6_encapsulation()
Helper->>Zebra: zebra_srv6_encap_src_addr_unset()
Helper->>Dataplane: dplane_srv6_encap_srcaddr_set(&in6addr_any, NS_DEFAULT)
VTY-->>User: CMD_SUCCESS
User->>VTY: no source-address
VTY->>Helper: unset_srv6_encapsulation()
Helper->>Zebra: zebra_srv6_encap_src_addr_unset()
Helper->>Dataplane: dplane_srv6_encap_srcaddr_set(&in6addr_any, NS_DEFAULT)
VTY-->>User: CMD_SUCCESS
|
cscarpitta
reviewed
Feb 6, 2026
…' is run Add a test cases to verify the SRv6 encapsulation source address is reset to its default value after running the 'no encapsulation' command under segment-routing/srv6. Signed-off-by: Kyrylo Yatsenko <hedrok@gmail.com>
Add missing command 'no encapsulation'. Add small static helper function `unset_srv6_encapsulation` to be used in 'no srv6', 'no encapsulation' and 'no source-address'. Signed-off-by: Kyrylo Yatsenko <hedrok@gmail.com>
9a935f4 to
3372c94
Compare
Contributor
Author
|
ci:rerun Unrelated failure in |
Contributor
Author
|
ci:rerun This time unrelated |
cscarpitta
approved these changes
Feb 7, 2026
Contributor
|
Can this be backported to |
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.
Add missing command 'no encapsulation'.
Add small static helper function
unset_srv6_encapsulationto be used in 'no srv6', 'no encapsulation' and 'no source-address'.Add test case for this command.