Thanks to visit codestin.com
Credit goes to github.com

Skip to content

zebra: Reset encapsulation source address when no srv6 is executed #19406

Merged
ton31337 merged 2 commits intoFRRouting:masterfrom
cscarpitta:fix/fix_no_srv6_command
Aug 14, 2025
Merged

zebra: Reset encapsulation source address when no srv6 is executed #19406
ton31337 merged 2 commits intoFRRouting:masterfrom
cscarpitta:fix/fix_no_srv6_command

Conversation

@cscarpitta
Copy link
Contributor

When the no srv6 command is executed, all configurations under the srv6 VTY node should be cleared and defaults restored. However, the encapsulation source address is not being reset and remains configured after running no srv6.

This commit corrects this behavior by ensuring the encapsulation source address is properly cleared and restored to its default state when no srv6 is executed.

The following example shows the issue.

Set source address to fcbb:bbbb:1::1 :

r1# configure
r1(config)# segment-routing
r1(config-sr)# srv6
r1(config-srv6)# encapsulation
r1(config-srv6-encap)# source-address fcbb:bbbb:1::1
r1(config-srv6-encap)# exit
r1(config-srv6)# exit
r1(config-sr)# exit
r1(config)# exit
r1# show running-config
...
segment-routing
 srv6
  encapsulation
   source-address fcbb:bbbb:1::1
...

Execute 'no srv6' :

r1# configure
r1(config)# segment-routing
r1(config-sr)# no srv6
r1# show running-config
...
segment-routing
 srv6
  encapsulation
   source-address fcbb:bbbb:1::1   <-- Source address remains configured
...

When the 'no srv6' command is executed, all configurations under the
'srv6' VTY node should be cleared and defaults restored. However, the
encapsulation source address is not being reset and remains configured
after running 'no srv6'.

This commit corrects this behavior by ensuring the encapsulation source
address is properly cleared and restored to its default state when
'no srv6' is executed.

The following example shows the issue.

// Set source address to fcbb:bbbb:1::1
r1# configure
r1(config)# segment-routing
r1(config-sr)# srv6
r1(config-srv6)# encapsulation
r1(config-srv6-encap)# source-address fcbb:bbbb:1::1
r1(config-srv6-encap)# exit
r1(config-srv6)# exit
r1(config-sr)# exit
r1(config)# exit
r1# show running-config
...
segment-routing
 srv6
  encapsulation
   source-address fcbb:bbbb:1::1
...

// Execute 'no srv6'
r1# configure
r1(config)# segment-routing
r1(config-sr)# no srv6
r1# show running-config
...
segment-routing
 srv6
  encapsulation
   source-address fcbb:bbbb:1::1   <-- Source address is still configured
...

Signed-off-by: Carmine Scarpitta <[email protected]>
Add a test cases to verify the SRv6 encapsulation source address is
reset to its default value after running the 'no srv6' command.

Signed-off-by: Carmine Scarpitta <[email protected]>
@frrbot frrbot bot added tests Topotests, make check, etc zebra labels Aug 14, 2025
@ton31337
Copy link
Member

@Mergifyio backport stable/10.4 stable/10.3

@mergify
Copy link

mergify bot commented Aug 14, 2025

backport stable/10.4 stable/10.3

✅ Backports have been created

Details

@ton31337 ton31337 merged commit 3f0815f into FRRouting:master Aug 14, 2025
19 checks passed
ton31337 added a commit that referenced this pull request Aug 14, 2025
zebra: Reset encapsulation source address when `no srv6` is executed  (backport #19406)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants