staticd: Avoid requesting SRv6 sid from zebra when loc and sid block dont match#18580
Conversation
|
Testing: Config: Without Fix: With Fix: |
6ee834a to
61c0eb6
Compare
| sid fcbb:bbbb:1:fe20::/64 locator MAIN behavior uDT6 vrf Vrf20 | ||
| sid fcbb:bbbb:1:fe30::/64 locator MAIN behavior uDT46 vrf Vrf30 | ||
| sid fcbb:bbbb:1:fe40::/64 locator MAIN behavior uA interface sr0 nexthop 2001::2 | ||
| sid fcbb:bbbb:1:fe50::/64 locator MAIN1 behavior uA interface sr0 nexthop 2001::3 |
There was a problem hiding this comment.
Can we keep frr.conf unchanged and move this invalid SID config to a new test case in https://github.com/FRRouting/frr/blob/master/tests/topotests/static_srv6_sids/test_static_srv6_sids.py?
It could be something called called test_srv6_static_sids_wrong_sid_block, and you could add a comment or doc string to make it clear that the purpose of the test is to verify how FRR behaves when the user provides an invalid configuration.
The reason behind this is that people often refer to frr.conf to figure out how to configure features in FRR. Having invalid configuration in frr.conf can lead to confusion.
☑️ Nothing to doDetails
|
61c0eb6 to
83ce325
Compare
…dont match Currently, when the locator block and sid block differs, staticd would still go ahead and request zebra to allocate the SID which it does if there is atleast one match (from any locators). Only when staticd tries to install the route, it sees that the locator block and sid block are different and avoids installing the route. Fix: Check if the locator block and sid block match before even requesting Zebra to allocate one. Signed-off-by: Rajasekar Raja <[email protected]>
83ce325 to
dbd9fed
Compare
|
@Mergifyio backport stable/10.3 |
✅ Backports have been createdDetails
|
…block_beforehand staticd: Avoid requesting SRv6 sid from zebra when loc and sid block don't match (manual backport #18580)
Currently, when the locator block and sid block differs, staticd would still go ahead and request zebra to allocate the SID which it does if there is atleast one match (from any locators).
Only when staticd tries to install the route, it sees that the locator block and sid block are different and avoids installing the route.
Fix:
Check if the locator block and sid block match before even requesting Zebra to allocate one.