Skip to content

Commit 30bde0c

Browse files
authored
Merge pull request FRRouting#16064 from FRRouting/mergify/bp/stable/8.4/pr-16032
zebra: Deny the routes if ip protocol CLI refers to an undefined rmap (backport FRRouting#16032)
2 parents baf6a9d + 3b25c6d commit 30bde0c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

zebra/zebra_routemap.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,7 @@ static int ip_protocol_rm_add(struct zebra_vrf *zvrf, const char *rmap,
257257
route_map_lookup_by_name(PROTO_RM_NAME(zvrf, afi, rtype));
258258
route_map_counter_increment(PROTO_RM_MAP(zvrf, afi, rtype));
259259

260-
if (PROTO_RM_MAP(zvrf, afi, rtype)) {
261-
260+
if (PROTO_RM_NAME(zvrf, afi, rtype)) {
262261
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
263262
zlog_debug(
264263
"%u: IPv4 Routemap config for protocol %d scheduling RIB processing",
@@ -284,7 +283,7 @@ static int ip_protocol_rm_del(struct zebra_vrf *zvrf, const char *rmap,
284283
if (!rmap || strcmp(rmap, PROTO_RM_NAME(zvrf, afi, rtype)) == 0) {
285284

286285
route_map_counter_decrement(PROTO_RM_MAP(zvrf, afi, rtype));
287-
if (PROTO_RM_MAP(zvrf, afi, rtype)) {
286+
if (PROTO_RM_NAME(zvrf, afi, rtype)) {
288287
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
289288
zlog_debug(
290289
"%u: IPv4 Routemap unconfig for protocol %d, scheduling RIB processing",

0 commit comments

Comments
 (0)