mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-06 09:36:35 +00:00
Merge pull request #16061 from FRRouting/mergify/bp/stable/9.1/pr-16032
zebra: Deny the routes if ip protocol CLI refers to an undefined rmap (backport #16032)
This commit is contained in:
commit
d2e83ece82
@ -301,8 +301,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_lookup_by_name(PROTO_RM_NAME(zvrf, afi, rtype));
|
||||||
route_map_counter_increment(PROTO_RM_MAP(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)
|
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"%u: IPv4 Routemap config for protocol %d scheduling RIB processing",
|
"%u: IPv4 Routemap config for protocol %d scheduling RIB processing",
|
||||||
@ -328,7 +327,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) {
|
if (!rmap || strcmp(rmap, PROTO_RM_NAME(zvrf, afi, rtype)) == 0) {
|
||||||
|
|
||||||
route_map_counter_decrement(PROTO_RM_MAP(zvrf, afi, rtype));
|
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)
|
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"%u: IPv4 Routemap unconfig for protocol %d, scheduling RIB processing",
|
"%u: IPv4 Routemap unconfig for protocol %d, scheduling RIB processing",
|
||||||
|
Loading…
Reference in New Issue
Block a user