summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2020-07-24 23:50:20 +0200
committerStephen Worley <sworley@cumulusnetworks.com>2020-09-28 18:40:59 +0200
commitcc6a0d7d80e176ce9cced99cb1d5de9792c6f3f3 (patch)
treef704bb996ac38c103b350e700cf4d0a98e17158a /lib
parentzebra: add logging for NHG ignoring in netlink (diff)
downloadfrr-cc6a0d7d80e176ce9cced99cb1d5de9792c6f3f3.tar.xz
frr-cc6a0d7d80e176ce9cced99cb1d5de9792c6f3f3.zip
Revert "lib,sharpd,pbrd: `set installable` nhg command"
This reverts commit 1844f45e30913b27cfd875036f865a0edadcf244.
Diffstat (limited to 'lib')
-rw-r--r--lib/nexthop_group.c53
-rw-r--r--lib/nexthop_group.h6
2 files changed, 7 insertions, 52 deletions
diff --git a/lib/nexthop_group.c b/lib/nexthop_group.c
index 136970cff..83905abe4 100644
--- a/lib/nexthop_group.c
+++ b/lib/nexthop_group.c
@@ -54,7 +54,6 @@ struct nexthop_group_hooks {
void (*del_nexthop)(const struct nexthop_group_cmd *nhg,
const struct nexthop *nhop);
void (*delete)(const char *name);
- void (*installable)(const struct nexthop_group_cmd *nhg);
};
static struct nexthop_group_hooks nhg_hooks;
@@ -676,37 +675,6 @@ DEFPY(no_nexthop_group_backup, no_nexthop_group_backup_cmd,
return CMD_SUCCESS;
}
-DEFPY(set_installable, set_installable_cmd,
- "set installable",
- "Set for nexthop-group\n"
- "Install nexthop-group into RIB as separate object\n")
-{
- VTY_DECLVAR_CONTEXT(nexthop_group_cmd, nhgc);
-
- nhgc->installable = true;
-
- if (nhg_hooks.installable)
- nhg_hooks.installable(nhgc);
-
- return CMD_SUCCESS;
-}
-
-DEFPY(no_set_installable, no_set_installable_cmd,
- "no set installable",
- NO_STR
- "Set for nexthop-group\n"
- "Install nexthop-group into RIB as separate object\n")
-{
- VTY_DECLVAR_CONTEXT(nexthop_group_cmd, nhgc);
-
- nhgc->installable = false;
-
- if (nhg_hooks.installable)
- nhg_hooks.installable(nhgc);
-
- return CMD_SUCCESS;
-}
-
static void nexthop_group_save_nhop(struct nexthop_group_cmd *nhgc,
const char *nhvrf_name,
const union sockunion *addr,
@@ -1179,9 +1147,6 @@ static int nexthop_group_write(struct vty *vty)
vty_out(vty, "nexthop-group %s\n", nhgc->name);
- if (nhgc->installable)
- vty_out(vty, " set installable\n");
-
if (nhgc->backup_list_name[0])
vty_out(vty, " backup-group %s\n",
nhgc->backup_list_name);
@@ -1351,14 +1316,12 @@ static const struct cmd_variable_handler nhg_name_handlers[] = {
{.tokenname = "NHGNAME", .completions = nhg_name_autocomplete},
{.completions = NULL}};
-void nexthop_group_init(
- void (*new)(const char *name),
- void (*add_nexthop)(const struct nexthop_group_cmd *nhg,
- const struct nexthop *nhop),
- void (*del_nexthop)(const struct nexthop_group_cmd *nhg,
- const struct nexthop *nhop),
- void (*delete)(const char *name),
- void (*installable)(const struct nexthop_group_cmd *nhg))
+void nexthop_group_init(void (*new)(const char *name),
+ void (*add_nexthop)(const struct nexthop_group_cmd *nhg,
+ const struct nexthop *nhop),
+ void (*del_nexthop)(const struct nexthop_group_cmd *nhg,
+ const struct nexthop *nhop),
+ void (*delete)(const char *name))
{
RB_INIT(nhgc_entry_head, &nhgc_entries);
@@ -1371,8 +1334,6 @@ void nexthop_group_init(
install_default(NH_GROUP_NODE);
install_element(NH_GROUP_NODE, &nexthop_group_backup_cmd);
install_element(NH_GROUP_NODE, &no_nexthop_group_backup_cmd);
- install_element(NH_GROUP_NODE, &set_installable_cmd);
- install_element(NH_GROUP_NODE, &no_set_installable_cmd);
install_element(NH_GROUP_NODE, &ecmp_nexthops_cmd);
memset(&nhg_hooks, 0, sizeof(nhg_hooks));
@@ -1385,6 +1346,4 @@ void nexthop_group_init(
nhg_hooks.del_nexthop = del_nexthop;
if (delete)
nhg_hooks.delete = delete;
- if (installable)
- nhg_hooks.installable = installable;
}
diff --git a/lib/nexthop_group.h b/lib/nexthop_group.h
index e06035ce6..5f7bde0de 100644
--- a/lib/nexthop_group.h
+++ b/lib/nexthop_group.h
@@ -97,9 +97,6 @@ struct nexthop_group_cmd {
struct list *nhg_list;
- /* Install nhg as separate object in RIB */
- bool installable;
-
QOBJ_FIELDS
};
RB_HEAD(nhgc_entry_head, nexthp_group_cmd);
@@ -119,8 +116,7 @@ void nexthop_group_init(
const struct nexthop *nhop),
void (*del_nexthop)(const struct nexthop_group_cmd *nhgc,
const struct nexthop *nhop),
- void (*destroy)(const char *name),
- void (*installable)(const struct nexthop_group_cmd *nhg));
+ void (*destroy)(const char *name));
void nexthop_group_enable_vrf(struct vrf *vrf);
void nexthop_group_disable_vrf(struct vrf *vrf);