Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgpd: update route leak after vrf interface changes #15351

Merged
merged 7 commits into from
Feb 20, 2024

Conversation

louis-6wind
Copy link
Contributor

Locally leaked routes are not updated after the nexthop VRF interface appears/disappears or goes down/up.

Fix the issues

@frrbot frrbot bot added bgp bugfix tests Topotests, make check, etc labels Feb 9, 2024
@louis-6wind
Copy link
Contributor Author

ci:rerun

Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks okay

r1 = tgen.gears["r1"]

logger.info("Ping from default to DONNA")
output = r1.run("ping -c 4 -w 4 -I 10.0.4.1 10.0.0.1")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we reuse check_ping()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Test functions were duplicated by mistakes. They were identical.

Fixes: 8af61c8 ("topotests: test leak from the default vrf")
Signed-off-by: Louis Scalbert <[email protected]>
Allow specifying a source_addr in check_ping library function.

Signed-off-by: Louis Scalbert <[email protected]>
Use check_ping in bgp_vrf_route_leak_basic

Signed-off-by: Louis Scalbert <[email protected]>
Locally leaked routes remain active after the nexthop VRF interface goes
down.

Update route leaking when the loopback or a VRF interface state change is
received from zebra.

Signed-off-by: Louis Scalbert <[email protected]>
Check that local route leaks are set to "inactive" when the VRF
interface is shutdown and, conversely, that they are set to "active"
when the VRF interface is unshut.

Signed-off-by: Louis Scalbert <[email protected]>
If the VRF is not yet created and a BGP instance is created for the
VRF, dependent leaked routes are inactive, which is normal. However,
when the VRF interface appears, they remains inactive.

Update route leak when a VRF interface appears. Note that routes to a
deleted VRF are already removed by zebra.

Signed-off-by: Louis Scalbert <[email protected]>
Ensure that a locally leaked route is updated after a VRF (dis)appears.

Signed-off-by: Louis Scalbert <[email protected]>
@louis-6wind louis-6wind force-pushed the fix-leak-vrf-interface branch from cebb290 to 1262ee6 Compare February 14, 2024 15:40
Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@riw777 riw777 merged commit ab40199 into FRRouting:master Feb 20, 2024
9 checks passed
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.

3 participants