Skip to content

Commit

Permalink
bgpd: Show which AFI is affected when prefix-list is not found
Browse files Browse the repository at this point in the history
When the prefix-list is not found, show which AFI is the real one we are
looking for.

E.g.: looking at this output is not clear:

```
[RYF1Z-ZKDRS] route_match_address_prefix_list: Prefix List p1 specified does not exist defaulting to NO_MATCH
```

route_match_address_prefix_list() is called by route_match_ipv6_address_prefix_list(),
and route_match_ip_address_prefix_list().

Signed-off-by: Donatas Abraitis <[email protected]>
  • Loading branch information
ton31337 committed Jul 31, 2024
1 parent 26eceb2 commit 2419fc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions bgpd/bgp_routemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,9 +680,8 @@ route_match_address_prefix_list(void *rule, afi_t afi,
plist = prefix_list_lookup(afi, (char *)rule);
if (plist == NULL) {
if (unlikely(CHECK_FLAG(rmap_debug, DEBUG_ROUTEMAP_DETAIL)))
zlog_debug(
"%s: Prefix List %s specified does not exist defaulting to NO_MATCH",
__func__, (char *)rule);
zlog_debug("%s: Prefix List %s (%s) specified does not exist defaulting to NO_MATCH",
__func__, (char *)rule, afi2str(afi));
return RMAP_NOMATCH;
}

Expand Down
5 changes: 2 additions & 3 deletions zebra/zebra_routemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,9 +650,8 @@ route_match_address_prefix_list(void *rule, const struct prefix *prefix,
plist = prefix_list_lookup(afi, (char *)rule);
if (plist == NULL) {
if (unlikely(CHECK_FLAG(rmap_debug, DEBUG_ROUTEMAP_DETAIL)))
zlog_debug(
"%s: Prefix List %s specified does not exist defaulting to NO_MATCH",
__func__, (char *)rule);
zlog_debug("%s: Prefix List %s (%s) specified does not exist defaulting to NO_MATCH",
__func__, (char *)rule, afi2str(afi));
return RMAP_NOMATCH;
}

Expand Down

0 comments on commit 2419fc5

Please sign in to comment.