zebra: Allow redistribution events to pass reserved ranges - #20599
Merged
riw777 merged 2 commits intoFeb 13, 2026
Merged
Conversation
Member
Author
|
before we pull the trigger here in any direction, let's make sure we discuss this in tomorrows tech meeting. |
Greptile OverviewGreptile SummaryModified Key Changes:
Impact:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client as Protocol Client (BGP/OSPF/etc)
participant Redistribute as zebra_redistribute_update()
participant CheckAddr as zebra_check_addr()
participant Config as allow-reserved-ranges Config
Note over Redistribute: Route update received
Redistribute->>CheckAddr: Check if address is valid for redistribution
alt Address is 127.x.x.x or 224.x.x.x (Class D)
CheckAddr->>Config: cmd_allow_reserved_ranges_get()
alt allow-reserved-ranges enabled
Config-->>CheckAddr: true
CheckAddr-->>Redistribute: return 1 (valid)
Redistribute->>Client: Send route update
else allow-reserved-ranges disabled (default)
Config-->>CheckAddr: false
CheckAddr-->>Redistribute: return 0 (invalid)
Note over Redistribute: Route filtered, not sent to client
end
else Address is link-local (169.254.x.x, non-Class E)
CheckAddr-->>Redistribute: return 0 (always invalid)
Note over Redistribute: Route filtered regardless of config
else Other valid address
CheckAddr-->>Redistribute: return 1 (valid)
Redistribute->>Client: Send route update
end
|
ton31337
reviewed
Jan 27, 2026
ton31337
left a comment
Member
There was a problem hiding this comment.
LGTM, but can we have a topotest?
donaldsharp
force-pushed
the
allow_redistribution_to_pass_reserved_ranges
branch
from
January 28, 2026 13:16
2af3509 to
0988ab1
Compare
Member
Author
|
topotest added |
ton31337
approved these changes
Jan 28, 2026
If `allow-reserved-ranges` has been configured, allow the redistribution event to be passed up to the interested protocol. I ran into this while playing with 224/4 flavors of static routes and was trying to get the static route into bgp. BGP was allowing network XXX statements for the routes. So I do not see much of a difference here. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
The previous commit added the ability for zebra to pass the reserved ranges up to interested protocols. BGP is the only one that currently accepts these values as far as I can tell at the moment. Test that redistribute X works with reserved ranges. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
donaldsharp
force-pushed
the
allow_redistribution_to_pass_reserved_ranges
branch
from
February 10, 2026 14:32
0988ab1 to
19d18c5
Compare
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.
If
allow-reserved-rangeshas been configured, allow the redistribution event to be passed up to the interested protocol.I ran into this while playing with 224/4 flavors of static routes and was trying to get the static route into bgp. BGP was allowing network XXX statements for the routes. So I do not see much of a difference here.