]> git.proxmox.com Git - mirror_frr.git/blobdiff - staticd/static_zebra.c
*: Convert zapi->interface_delete to ifp callback
[mirror_frr.git] / staticd / static_zebra.c
index c494cf6cce8adf20d0ed91376bbd679442cab1e4..b364dd62900f0a6d95d232eeff21bd3c4ff9c1c3 100644 (file)
@@ -57,21 +57,8 @@ static int static_ifp_create(struct interface *ifp)
        return 0;
 }
 
-static int interface_delete(ZAPI_CALLBACK_ARGS)
+static int static_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;
-
-       if_set_index(ifp, IFINDEX_INTERNAL);
-
        static_ifindex_update(ifp, false);
        return 0;
 }
@@ -476,11 +463,6 @@ extern void static_zebra_route_add(struct route_node *rn,
                           zclient, &api);
 }
 
-static int static_ifp_destroy(struct interface *ifp)
-{
-       return 0;
-}
-
 void static_zebra_init(void)
 {
        struct zclient_options opt = { .receive_notify = true };
@@ -493,7 +475,6 @@ void static_zebra_init(void)
        zclient_init(zclient, ZEBRA_ROUTE_STATIC, 0, &static_privs);
        zclient->zebra_capabilities = static_zebra_capabilities;
        zclient->zebra_connected = zebra_connected;
-       zclient->interface_delete = interface_delete;
        zclient->interface_address_add = interface_address_add;
        zclient->interface_address_delete = interface_address_delete;
        zclient->route_notify_owner = route_notify_owner;