]> git.proxmox.com Git - mirror_frr.git/commitdiff
eigrpd: Save whether or not a interface is passive.
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 17 Apr 2017 14:01:51 +0000 (10:01 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 17 Apr 2017 14:01:51 +0000 (10:01 -0400)
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>
eigrpd/eigrp_vty.c

index 1793b342469d948ada38d90e5e785a9c79143c6c..1fc8c54594fe7f008489bd73370fbb79d7ba5f34 100644 (file)
@@ -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;
 }