summaryrefslogtreecommitdiffstats
path: root/eigrpd/eigrp_routemap.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2019-09-03 16:42:51 +0200
committerGitHub <noreply@github.com>2019-09-03 16:42:51 +0200
commit1076e2c2b27225950b0f3d7e65ece582c9bf61c9 (patch)
tree4a978fd24f46a4ad6deb7d5fed8dd98deba3b448 /eigrpd/eigrp_routemap.c
parentMerge pull request #4797 from opensourcerouting/eigrpd-vrf (diff)
parent*: Convert some route map functions to return the enum (diff)
downloadfrr-1076e2c2b27225950b0f3d7e65ece582c9bf61c9.tar.xz
frr-1076e2c2b27225950b0f3d7e65ece582c9bf61c9.zip
Merge pull request #4888 from donaldsharp/rmap_cleanup
Rmap cleanup
Diffstat (limited to 'eigrpd/eigrp_routemap.c')
-rw-r--r--eigrpd/eigrp_routemap.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/eigrpd/eigrp_routemap.c b/eigrpd/eigrp_routemap.c
index bac749477..d78588644 100644
--- a/eigrpd/eigrp_routemap.c
+++ b/eigrpd/eigrp_routemap.c
@@ -135,7 +135,8 @@ void eigrp_rmap_update(const char *notused)
static int eigrp_route_match_add(struct vty *vty, struct route_map_index *index,
const char *command, const char *arg)
{
- int ret;
+ enum rmap_compile_rets ret;
+
ret = route_map_add_match(index, command, arg, type);
switch (ret) {
case RMAP_RULE_MISSING:
@@ -147,6 +148,10 @@ static int eigrp_route_match_add(struct vty *vty, struct route_map_index *index,
return CMD_WARNING_CONFIG_FAILED;
break;
case RMAP_COMPILE_SUCCESS:
+ case RMAP_DUPLICATE_RULE:
+ /*
+ * Intentionally not handling these cases
+ */
break;
}
@@ -158,7 +163,8 @@ static int eigrp_route_match_delete(struct vty *vty,
struct route_map_index *index,
const char *command, const char *arg)
{
- int ret;
+ enum rmap_compile_rets ret;
+
ret = route_map_delete_match(index, command, arg);
switch (ret) {
case RMAP_RULE_MISSING:
@@ -170,6 +176,10 @@ static int eigrp_route_match_delete(struct vty *vty,
return CMD_WARNING_CONFIG_FAILED;
break;
case RMAP_COMPILE_SUCCESS:
+ case RMAP_DUPLICATE_RULE:
+ /*
+ * These cases intentionally ignored
+ */
break;
}
@@ -180,7 +190,7 @@ static int eigrp_route_match_delete(struct vty *vty,
static int eigrp_route_set_add(struct vty *vty, struct route_map_index *index,
const char *command, const char *arg)
{
- int ret;
+ enum rmap_compile_rets ret;
ret = route_map_add_set(index, command, arg);
switch (ret) {
@@ -201,6 +211,10 @@ static int eigrp_route_set_add(struct vty *vty, struct route_map_index *index,
}
break;
case RMAP_COMPILE_SUCCESS:
+ case RMAP_DUPLICATE_RULE:
+ /*
+ * These cases intentionally left blank here
+ */
break;
}
@@ -212,7 +226,7 @@ static int eigrp_route_set_delete(struct vty *vty,
struct route_map_index *index,
const char *command, const char *arg)
{
- int ret;
+ enum rmap_compile_rets ret;
ret = route_map_delete_set(index, command, arg);
switch (ret) {
@@ -225,6 +239,10 @@ static int eigrp_route_set_delete(struct vty *vty,
return CMD_WARNING_CONFIG_FAILED;
break;
case RMAP_COMPILE_SUCCESS:
+ case RMAP_DUPLICATE_RULE:
+ /*
+ * These cases intentionally not handled
+ */
break;
}