Browse Source

ospf6d: remove unused broken function

ospf6_interface_if_del has not been in use since for quite some
years and is broken. (Will crash ospf6d if oi->area == NULL)

Since it is not used, just remove it.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Tested-by: NetDEF CI System <cisystem@netdef.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
Christian Franke 3 years ago
parent
commit
8db38639cc
3 changed files with 0 additions and 31 deletions
  1. 0 23
      ospf6d/ospf6_interface.c
  2. 0 1
      ospf6d/ospf6_interface.h
  3. 0 7
      ospf6d/ospf6_zebra.c

+ 0 - 23
ospf6d/ospf6_interface.c

@@ -340,29 +340,6 @@ ospf6_interface_if_add (struct interface *ifp)
 }
 
 void
-ospf6_interface_if_del (struct interface *ifp)
-{
-  struct ospf6_interface *oi;
-
-  oi = (struct ospf6_interface *) ifp->info;
-  if (oi == NULL)
-    return;
-
-  /* interface stop */
-  if (oi->area)
-    thread_execute (master, interface_down, oi, 0);
-
-  listnode_delete (oi->area->if_list, oi);
-  oi->area = (struct ospf6_area *) NULL;
-
-  /* cut link */
-  oi->interface = NULL;
-  ifp->info = NULL;
-
-  ospf6_interface_delete (oi);
-}
-
-void
 ospf6_interface_state_update (struct interface *ifp)
 {
   struct ospf6_interface *oi;

+ 0 - 1
ospf6d/ospf6_interface.h

@@ -157,7 +157,6 @@ extern void ospf6_interface_enable (struct ospf6_interface *);
 extern void ospf6_interface_disable (struct ospf6_interface *);
 
 extern void ospf6_interface_if_add (struct interface *);
-extern void ospf6_interface_if_del (struct interface *);
 extern void ospf6_interface_state_update (struct interface *);
 extern void ospf6_interface_connected_route_update (struct interface *);
 

+ 0 - 7
ospf6d/ospf6_zebra.c

@@ -120,13 +120,6 @@ ospf6_zebra_if_del (int command, struct zclient *zclient, zebra_size_t length,
     zlog_debug ("Zebra Interface delete: %s index %d mtu %d",
 		ifp->name, ifp->ifindex, ifp->mtu6);
 
-#if 0
-  /* XXX: ospf6_interface_if_del is not the right way to handle this,
-   * because among other thinkable issues, it will also clear all
-   * settings as they are contained in the struct ospf6_interface. */
-  ospf6_interface_if_del (ifp);
-#endif /*0*/
-
   ifp->ifindex = IFINDEX_INTERNAL;
   return 0;
 }