Skip to content

Commit 4bd1648

Browse files
authored
Merge pull request FRRouting#16032 from Pdoijode/pdoijode/zebra-rt-deny-fix
zebra: Deny the routes if ip protocol CLI refers to an undefined rmap
2 parents c002c5c + 705e8ef commit 4bd1648

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
@@ -299,8 +299,7 @@ int ip_protocol_rm_add(struct zebra_vrf *zvrf, const char *rmap, int rtype,
299299
route_map_lookup_by_name(PROTO_RM_NAME(zvrf, afi, rtype));
300300
route_map_counter_increment(PROTO_RM_MAP(zvrf, afi, rtype));
301301

302-
if (PROTO_RM_MAP(zvrf, afi, rtype)) {
303-
302+
if (PROTO_RM_NAME(zvrf, afi, rtype)) {
304303
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
305304
zlog_debug(
306305
"%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,
326325
if (!rmap || strcmp(rmap, PROTO_RM_NAME(zvrf, afi, rtype)) == 0) {
327326

328327
route_map_counter_decrement(PROTO_RM_MAP(zvrf, afi, rtype));
329-
if (PROTO_RM_MAP(zvrf, afi, rtype)) {
328+
if (PROTO_RM_NAME(zvrf, afi, rtype)) {
330329
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
331330
zlog_debug(
332331
"%u: IPv4 Routemap unconfig for protocol %d, scheduling RIB processing",

0 commit comments

Comments
 (0)