-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
multiple staticd fixes #8101
multiple staticd fixes #8101
Conversation
When checking for local connected address used as a nexthop gateway, we should check nexthop VRF, not route VRF. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Currently, staticd creates a VRF for the nexthop it is trying to install. Later, when this nexthop is deleted, the VRF stays in the system and can not be deleted by the user because "no vrf" command doesn't work for this VRF because it was not created through northbound code. There is no need to create the VRF. Just set nh_vrf_id to VRF_UNKNOWN when the VRF doesn't exist. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
When enabling the VRF, we should not install the nexthops that rely on non-existent VRF. For example, if we have route "1.1.1.0/24 2.2.2.2 vrf red nexthop-vrf blue", and VRF red is enabled, we should not install it if VRF blue doesn't exist. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
@@ -140,26 +140,14 @@ static bool static_nexthop_create(struct nb_cb_create_args *args, | |||
pn = nb_running_get_entry(args->dnode, NULL, true); | |||
rn = nb_running_get_entry(rn_dnode, NULL, true); | |||
|
|||
if (!static_add_nexthop_validate(info->svrf, nh_type, &ipaddr)) | |||
if (!static_add_nexthop_validate(nh_vrf, nh_type, &ipaddr)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just trying to follow this: what if the nexthop-vrf is not specified? I think the expectation has been that the vrf of the route is used for all nexthops that don't supply a specific nexthop-vrf - is this a change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, if the nexthop-vrf is not specified, then the vrf field in the nexthop dnode will be the same as the vrf of the route. Nothing changed for such nexthops.
But when it is specified, then we need to check the specified one, not the one from the route.
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-17193/ This is a comment from an automated CI system. Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base4 Static Analyzer issues remaining.See details at |
Please, check individual commits descriptions.