Skip to content

Conversation

donaldsharp
Copy link
Member

If an operator configures a vrf that happens to overlap with the default table, don't allow it just like we don't allow two vrf's to have the same tableid.

Fixes: #18699

@ton31337
Copy link
Member

@Mergifyio backport stable/10.3 stable/10.2 stable/10.1 stable/10.0

Copy link

mergify bot commented Apr 23, 2025

backport stable/10.3 stable/10.2 stable/10.1 stable/10.0

✅ Backports have been created

@donaldsharp donaldsharp force-pushed the prevent_non_default_usage_of_table branch from 35a7763 to a51a3c1 Compare April 23, 2025 13:22
If an operator configures a vrf that happens to overlap with
the default table, don't allow it just like we don't allow
two vrf's to have the same tableid.

Fixes: FRRouting#18699

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
@donaldsharp donaldsharp force-pushed the prevent_non_default_usage_of_table branch from a51a3c1 to 3c009ff Compare May 11, 2025 12:36
@crosser
Copy link
Contributor

crosser commented May 12, 2025

@donaldsharp would it be a better approach to just return "vrf not found" if more that one VRF refers to the same table ID? Kernel does not prevent creation of multiple VRFs with the same table ID.

(For our use case, we want a way to route some traffic using only main table (254), but not e.g. "local" table (255), and we use a VRF for that. Of course it would be still possible to achieve by other means, VRF is just the most convenient in our case.)

@donaldsharp
Copy link
Member Author

I'm not terribly interested in trying to figure out how to get this right inside all the code paths. Nor am I interested in figuring out what it means. So as of this moment I would prefer that this be the behavior.

@ton31337 ton31337 merged commit 9ebaaba into FRRouting:master May 12, 2025
13 checks passed
donaldsharp added a commit that referenced this pull request May 12, 2025
zebra: Prevent vrf table 254 being used by non-default vrf (backport #18702)
donaldsharp added a commit that referenced this pull request May 12, 2025
zebra: Prevent vrf table 254 being used by non-default vrf (backport #18702)
donaldsharp added a commit that referenced this pull request May 12, 2025
zebra: Prevent vrf table 254 being used by non-default vrf (backport #18702)
donaldsharp added a commit that referenced this pull request May 12, 2025
zebra: Prevent vrf table 254 being used by non-default vrf (backport #18702)
@crosser
Copy link
Contributor

crosser commented May 13, 2025

Fair enough.

But in that case, should zebra at least refuse to work consistently, both when it starts up, and when it is dynamically reconfigured? As far as I can see, it runs after being restarted. Is that correct behaviour?

@donaldsharp donaldsharp deleted the prevent_non_default_usage_of_table branch July 30, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zebra crashes with signal 11 upon deletion of VRF with table ID 254
3 participants