summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-04-17 10:01:51 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-04-17 10:01:51 -0400
commitbe81f272784d40ec740398c060dd12ef58df0180 (patch)
treee2ffeb8284b76623d8bec3cc469440bce1a67642
parentdbc56a10d451a836ef5409242d121dcfadd25ced (diff)
eigrpd: Save whether or not a interface is passive.
Save whether or not a interface is passive in EIGRP. More work is needed to actual respect that. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--eigrpd/eigrp_vty.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/eigrpd/eigrp_vty.c b/eigrpd/eigrp_vty.c
index 1793b34246..1fc8c54594 100644
--- a/eigrpd/eigrp_vty.c
+++ b/eigrpd/eigrp_vty.c
@@ -244,9 +244,16 @@ DEFUN (eigrp_passive_interface,
"Suppress routing updates on an interface\n"
"Interface to suppress on\n")
{
- //struct eigrp *eigrp = vty->index;
- /*TODO: */
+ VTY_DECLVAR_CONTEXT(eigrp, eigrp);
+ struct eigrp_interface *ei;
+ struct listnode *node;
+ char *ifname = argv[1]->arg;
+ for (ALL_LIST_ELEMENTS_RO (eigrp->eiflist, node, ei))
+ {
+ if (strcmp (ifname, ei->ifp->name) == 0)
+ SET_IF_PARAM (IF_DEF_PARAMS (ei->ifp), passive_interface);
+ }
return CMD_SUCCESS;
}
@@ -257,8 +264,16 @@ DEFUN (no_eigrp_passive_interface,
"Suppress routing updates on an interface\n"
"Interface to suppress on\n")
{
- //struct eigrp *eigrp = vty->index;
- /*TODO: */
+ VTY_DECLVAR_CONTEXT(eigrp, eigrp);
+ struct eigrp_interface *ei;
+ struct listnode *node;
+ char *ifname = argv[2]->arg;
+
+ for (ALL_LIST_ELEMENTS_RO (eigrp->eiflist, node, ei))
+ {
+ if (strcmp (ifname, ei->ifp->name) == 0)
+ UNSET_IF_PARAM (IF_DEF_PARAMS (ei->ifp), passive_interface);
+ }
return CMD_SUCCESS;
}