-
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
Static route issues #9005
base: master
Are you sure you want to change the base?
Static route issues #9005
Conversation
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Due to pecularities with the parsing of static routes `ip route 4.5.6.7/32 reject nexthop-vrf X` is allowed this makes no sense. Stop this. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Due to pecularities of the static route command sometimes the interface name is actually a blackhole/reject or Null0. Since we know (ha!) that users will not create interface names using that syntax we should be ok to do the substitution. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
@@ -152,6 +152,14 @@ static bool static_nexthop_create(struct nb_cb_create_args *args, | |||
return NB_ERR_VALIDATION; | |||
} | |||
} | |||
nh_type = yang_dnode_get_enum(args->dnode, "./nh-type"); | |||
nh_vrf = yang_dnode_get_string(args->dnode, "./vrf"); | |||
if (nh_type == STATIC_BLACKHOLE && nh_vrf) { |
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.
vrf is part of the nexthop key, it is always set. this check is always true
for blackhole routes.
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 need to compare nexthop's vrf with the route's vrf to achieve what you want.
|
||
memset(buf_src_prefix, 0, PREFIX_STRLEN); | ||
memset(buf_nh_type, 0, PREFIX_STRLEN); | ||
|
||
if (ifname) { |
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.
I am not sure about this.
Currently, if you try to use some parameters that are not allowed for blackhole
and reject
routes, for example, onlink
or nexthop-vrf
, you receive the following error: Nexthop interface name can not be from reserved keywords(Null0, reject, blackhole)
. This doesn't work for Null0
routes, because of this hack with ifname
and flag_str
– Null0
is being treated as a regular route instead of a blackhole route.
With this change, you actually expand this problem with Null0
to also blackhole
and reject
routes. Please, check my PR #9006 - I think this is the right way to fix this.
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 i386 part 4: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO4U18I386-20124/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 4:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO4U18I386/ErrorLog/log_topotests.txt Topotests debian 10 amd64 part 9: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO9DEB10AMD64-20124/test Topology Tests failed for Topotests debian 10 amd64 part 9:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO9DEB10AMD64/ErrorLog/log_topotests.txt Topotests Ubuntu 18.04 i386 part 9: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO9U18I386-20124/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 9:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO9U18I386/ErrorLog/log_topotests.txt Topotests Ubuntu 18.04 amd64 part 7: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO7U18AMD64-20124/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 7:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO7U18AMD64/ErrorLog/log_topotests.txt Topotests Ubuntu 18.04 amd64 part 4: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TP4U1804AMD64-20124/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 4:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TP4U1804AMD64/ErrorLog/log_topotests.txt Topotests Ubuntu 18.04 arm8 part 5: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 5: No useful log foundTopotests Ubuntu 18.04 arm8 part 4: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 4: No useful log foundTopotests Ubuntu 18.04 i386 part 5: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO5U18I386-20124/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 5:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO5U18I386/ErrorLog/log_topotests.txt Topotests Ubuntu 18.04 arm8 part 9: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 9: No useful log foundTopotests debian 10 amd64 part 4: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO4DEB10AMD64-20124/test Topology Tests failed for Topotests debian 10 amd64 part 4:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO4DEB10AMD64/ErrorLog/log_topotests.txt Topotests Ubuntu 18.04 amd64 part 9: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO9U18AMD64-20124/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 9:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO9U18AMD64/ErrorLog/log_topotests.txt Topotests debian 10 amd64 part 5: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO5DEB10AMD64-20124/test Topology Tests failed for Topotests debian 10 amd64 part 5:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO5DEB10AMD64/ErrorLog/log_topotests.txt Topotests Ubuntu 18.04 amd64 part 5: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO5U18AMD64-20124/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 5:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO5U18AMD64/ErrorLog/log_topotests.txt Topotests debian 10 amd64 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO6DEB10AMD64-20124/test Topology Tests failed for Topotests debian 10 amd64 part 6:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO6DEB10AMD64/ErrorLog/log_topotests.txt Topotests Ubuntu 18.04 i386 part 2: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO2U18I386-20124/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 2:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO2U18I386/ErrorLog/log_topotests.txt Topotests debian 10 amd64 part 7: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO7DEB10AMD64-20124/test Topology Tests failed for Topotests debian 10 amd64 part 7:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO7DEB10AMD64/ErrorLog/log_topotests.txt Topotests Ubuntu 18.04 arm8 part 6: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 6: No useful log foundTopotests Ubuntu 18.04 i386 part 7: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO7U18I386-20124/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 7:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO7U18I386/ErrorLog/log_topotests.txt Topotests Ubuntu 18.04 arm8 part 1: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 1: No useful log foundTopotests Ubuntu 18.04 arm8 part 7: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 7: No useful log foundTopotests Ubuntu 18.04 amd64 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO6U18AMD64-20124/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 6:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO6U18AMD64/ErrorLog/log_topotests.txt Topotests Ubuntu 18.04 arm8 part 2: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO2U18ARM8-20124/test Topology Tests failed for Topotests Ubuntu 18.04 arm8 part 2:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO2U18ARM8/ErrorLog/log_topotests.txt Topotests Ubuntu 18.04 amd64 part 1: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TP1U1804AMD64-20124/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 1:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TP1U1804AMD64/ErrorLog/log_topotests.txt Topotests Ubuntu 18.04 amd64 part 2: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TP2U1804AMD64-20124/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 2:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TP2U1804AMD64/ErrorLog/log_topotests.txt Topotests Ubuntu 18.04 i386 part 1: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO1U18I386-20124/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 1:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO1U18I386/ErrorLog/log_topotests.txt Topotests Ubuntu 18.04 i386 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO6U18I386-20124/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 6:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO6U18I386/ErrorLog/log_topotests.txt Topotests debian 10 amd64 part 2: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO2DEB10AMD64-20124/test Topology Tests failed for Topotests debian 10 amd64 part 2:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO2DEB10AMD64/ErrorLog/log_topotests.txt Topotests debian 10 amd64 part 1: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO1DEB10AMD64-20124/test Topology Tests failed for Topotests debian 10 amd64 part 1:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20124/artifact/TOPO1DEB10AMD64/ErrorLog/log_topotests.txt Successful on other platforms/tests
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
The typedef to enum conversion was done here #9410 , we might be missing the improved blackhole handling and the reject nexthop-vrf checks. This PR needs rebase. |
ip route 4.5.6.7/32 blackhole nexthop-vrf X
command