summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2024-05-21 14:45:08 -0400
committerGitHub <noreply@github.com>2024-05-21 14:45:08 -0400
commitab6b39ef745052ebe5106424af0065eaf93af507 (patch)
tree37f6958e620a7b66078b47818e2a9751b98e729e
parentc4336b657f5f19f42686a45f5c519a563ce05617 (diff)
parentc693cc657d2a01bdfb6a424505b3d98030d62559 (diff)
Merge pull request #16060 from FRRouting/mergify/bp/stable/10.0/pr-16032
zebra: Deny the routes if ip protocol CLI refers to an undefined rmap (backport #16032)
-rw-r--r--zebra/zebra_routemap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c
index 95da789108..c1ec5067d9 100644
--- a/zebra/zebra_routemap.c
+++ b/zebra/zebra_routemap.c
@@ -299,8 +299,7 @@ int ip_protocol_rm_add(struct zebra_vrf *zvrf, const char *rmap, int rtype,
route_map_lookup_by_name(PROTO_RM_NAME(zvrf, afi, rtype));
route_map_counter_increment(PROTO_RM_MAP(zvrf, afi, rtype));
- if (PROTO_RM_MAP(zvrf, afi, rtype)) {
-
+ if (PROTO_RM_NAME(zvrf, afi, rtype)) {
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug(
"%u: IPv4 Routemap config for protocol %d scheduling RIB processing",
@@ -326,7 +325,7 @@ int ip_protocol_rm_del(struct zebra_vrf *zvrf, const char *rmap, int rtype,
if (!rmap || strcmp(rmap, PROTO_RM_NAME(zvrf, afi, rtype)) == 0) {
route_map_counter_decrement(PROTO_RM_MAP(zvrf, afi, rtype));
- if (PROTO_RM_MAP(zvrf, afi, rtype)) {
+ if (PROTO_RM_NAME(zvrf, afi, rtype)) {
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug(
"%u: IPv4 Routemap unconfig for protocol %d, scheduling RIB processing",