]> git.proxmox.com Git - mirror_frr.git/blobdiff - ripngd/ripng_interface.c
*: Convert zapi->interface_delete to ifp callback
[mirror_frr.git] / ripngd / ripng_interface.c
index 4f238f179ce9f5ba4df2078a7f4fe076e81a4582..a132f723edb3c2bbf835cb585582efffb69bfea1 100644 (file)
@@ -256,19 +256,8 @@ static int ripng_ifp_create(struct interface *ifp)
        return 0;
 }
 
-int ripng_interface_delete(ZAPI_CALLBACK_ARGS)
+static int ripng_ifp_destroy(struct interface *ifp)
 {
-       struct interface *ifp;
-       struct stream *s;
-
-       s = zclient->ibuf;
-       /*  zebra_interface_state_read() updates interface structure in iflist
-        */
-       ifp = zebra_interface_state_read(s, vrf_id);
-
-       if (ifp == NULL)
-               return 0;
-
        ripng_interface_sync(ifp);
        if (if_is_up(ifp)) {
                ripng_if_down(ifp);
@@ -279,10 +268,6 @@ int ripng_interface_delete(ZAPI_CALLBACK_ARGS)
                ifp->name, ifp->vrf_id, ifp->ifindex,
                (unsigned long long)ifp->flags, ifp->metric, ifp->mtu6);
 
-       /* To support pseudo interface do not free interface structure.  */
-       /* if_delete(ifp); */
-       if_set_index(ifp, IFINDEX_INTERNAL);
-
        return 0;
 }
 
@@ -964,11 +949,6 @@ static struct cmd_node interface_node = {
        INTERFACE_NODE, "%s(config-if)# ", 1 /* VTYSH */
 };
 
-static int ripng_ifp_destroy(struct interface *ifp)
-{
-       return 0;
-}
-
 /* Initialization of interface. */
 void ripng_if_init(void)
 {