Skip to content

Commit

Permalink
Merge pull request FRRouting#16063 from FRRouting/mergify/bp/stable/8…
Browse files Browse the repository at this point in the history
….5/pr-16032

zebra: Deny the routes if ip protocol CLI refers to an undefined rmap (backport FRRouting#16032)
  • Loading branch information
donaldsharp authored May 21, 2024
2 parents 50f5155 + ce7fcbb commit dc0888c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions zebra/zebra_routemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,7 @@ static int ip_protocol_rm_add(struct zebra_vrf *zvrf, const char *rmap,
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",
Expand All @@ -347,7 +346,7 @@ static int ip_protocol_rm_del(struct zebra_vrf *zvrf, const char *rmap,
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",
Expand Down

0 comments on commit dc0888c

Please sign in to comment.