summaryrefslogtreecommitdiff
path: root/lib/routemap.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/routemap.c')
-rw-r--r--lib/routemap.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/routemap.c b/lib/routemap.c
index 7749ea4cc7..22b4beb79d 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -353,8 +353,7 @@ int generic_match_add(struct vty *vty, struct route_map_index *index,
"%% [%s] Argument form is unsupported or malformed.\n",
frr_protonameinst);
else
- zlog_warn("Argument form is unsupported or malformed: "
- "%s %s", command, arg);
+ zlog_warn("Argument form is unsupported or malformed: %s %s", command, arg);
return CMD_WARNING_CONFIG_FAILED;
case RMAP_COMPILE_SUCCESS:
/*
@@ -405,8 +404,7 @@ int generic_match_delete(struct vty *vty, struct route_map_index *index,
"%% [%s] Argument form is unsupported or malformed.\n",
frr_protonameinst);
else
- zlog_warn("Argument form is unsupported or malformed: "
- "%s %s", command, arg);
+ zlog_warn("Argument form is unsupported or malformed: %s %s", command, arg);
retval = CMD_WARNING_CONFIG_FAILED;
break;
case RMAP_COMPILE_SUCCESS:
@@ -441,8 +439,7 @@ int generic_set_add(struct vty *vty, struct route_map_index *index,
"%% [%s] Argument form is unsupported or malformed.\n",
frr_protonameinst);
else
- zlog_warn("Argument form is unsupported or malformed: "
- "%s %s", command, arg);
+ zlog_warn("Argument form is unsupported or malformed: %s %s", command, arg);
return CMD_WARNING_CONFIG_FAILED;
case RMAP_COMPILE_SUCCESS:
break;
@@ -470,8 +467,7 @@ int generic_set_delete(struct vty *vty, struct route_map_index *index,
"%% [%s] Argument form is unsupported or malformed.\n",
frr_protonameinst);
else
- zlog_warn("Argument form is unsupported or malformed: "
- "%s %s", command, arg);
+ zlog_warn("Argument form is unsupported or malformed: %s %s", command, arg);
return CMD_WARNING_CONFIG_FAILED;
case RMAP_COMPILE_SUCCESS:
break;
@@ -1692,14 +1688,19 @@ route_map_get_index(struct route_map *map, const struct prefix *prefix,
* more noops, we retain this return value and
* return this eventually if there are no
* matches.
+ * If a best match route-map index already
+ * exists, do not reset the match_ret.
*/
- if (*match_ret != RMAP_NOMATCH)
+ if (!best_index && (*match_ret != RMAP_NOMATCH))
*match_ret = ret;
} else {
/*
* ret is RMAP_NOMATCH.
+ * If a best match route-map index already
+ * exists, do not reset the match_ret.
*/
- *match_ret = ret;
+ if (!best_index)
+ *match_ret = ret;
}
}