From: Donald Sharp Date: Mon, 13 Feb 2023 14:35:55 +0000 (-0500) Subject: zebra: Add access-list lookup failures to debug routemap detail X-Git-Tag: base_9.0~400^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=774cd0cd6c55f293fabbda8fc717aed5ccc5d029;p=matthieu%2Ffrr.git zebra: Add access-list lookup failures to debug routemap detail Signed-off-by: Donald Sharp --- diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 7a0bb5bf46..8f24404a44 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -1055,8 +1055,13 @@ route_match_ip_next_hop(void *rule, const struct prefix *prefix, void *object) return RMAP_NOMATCH; } alist = access_list_lookup(AFI_IP, (char *)rule); - if (alist == NULL) + if (alist == NULL) { + if (CHECK_FLAG(rmap_debug, DEBUG_ROUTEMAP_DETAIL)) + zlog_debug( + "%s: Access-List Specified: %s does not exist defaulting to NO_MATCH", + __func__, (char *)rule); return RMAP_NOMATCH; + } return (access_list_apply(alist, &p) == FILTER_DENY ? RMAP_NOMATCH : RMAP_MATCH); @@ -1154,8 +1159,13 @@ route_match_address(afi_t afi, void *rule, const struct prefix *prefix, struct access_list *alist; alist = access_list_lookup(afi, (char *)rule); - if (alist == NULL) + if (alist == NULL) { + if (CHECK_FLAG(rmap_debug, DEBUG_ROUTEMAP_DETAIL)) + zlog_debug( + "%s: Access-List Specified: %s does not exist defaulting to NO_MATCH", + __func__, (char *)rule); return RMAP_NOMATCH; + } return (access_list_apply(alist, prefix) == FILTER_DENY ? RMAP_NOMATCH : RMAP_MATCH);