Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zebra: Deny the routes if ip protocol CLI refers to an undefined rmap #16032

Merged
merged 1 commit into from
May 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions zebra/zebra_routemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
Loading