]> git.proxmox.com Git - mirror_frr.git/blobdiff - vrrpd/vrrp_zebra.c
Merge pull request #5793 from ton31337/fix/formatting_show_bgp_summary_failed
[mirror_frr.git] / vrrpd / vrrp_zebra.c
index 4678a233312ca88e7b1244b8eebfe4a731d5edfc..000672a0803f8002b1b2b2962d21b32e4e38c17b 100644 (file)
@@ -89,22 +89,12 @@ int vrrp_ifp_create(struct interface *ifp)
        return 0;
 }
 
-static int vrrp_zebra_if_del(int command, struct zclient *zclient,
-                            zebra_size_t length, vrf_id_t vrf_id)
+int vrrp_ifp_destroy(struct interface *ifp)
 {
-       struct interface *ifp;
-
-       ifp = zebra_interface_state_read(zclient->ibuf, vrf_id);
-
-       if (!ifp)
-               return 0;
-
-       vrrp_zebra_debug_if_state(ifp, vrf_id, __func__);
+       vrrp_zebra_debug_if_state(ifp, ifp->vrf_id, __func__);
 
        vrrp_if_del(ifp);
 
-       if_set_index(ifp, IFINDEX_INTERNAL);
-
        return 0;
 }
 
@@ -185,7 +175,7 @@ void vrrp_zebra_radv_set(struct vrrp_router *r, bool enable)
               "Requesting Zebra to turn router advertisements %s for %s",
               r->vr->vrid, enable ? "on" : "off", r->mvl_ifp->name);
 
-       zclient_send_interface_radv_req(zclient, VRF_DEFAULT, r->mvl_ifp,
+       zclient_send_interface_radv_req(zclient, r->mvl_ifp->vrf_id, r->mvl_ifp,
                                        enable, VRRP_RADV_INT);
 }
 
@@ -195,15 +185,10 @@ int vrrp_zclient_send_interface_protodown(struct interface *ifp, bool down)
               VRRP_LOGPFX "Requesting Zebra to set %s protodown %s", ifp->name,
               down ? "on" : "off");
 
-       return zclient_send_interface_protodown(zclient, VRF_DEFAULT, ifp,
+       return zclient_send_interface_protodown(zclient, ifp->vrf_id, ifp,
                                                down);
 }
 
-int vrrp_ifp_destroy(struct interface *ifp)
-{
-       return 0;
-}
-
 void vrrp_zebra_init(void)
 {
        if_zapi_callbacks(vrrp_ifp_create, vrrp_ifp_up,
@@ -214,7 +199,6 @@ void vrrp_zebra_init(void)
 
        zclient->zebra_connected = vrrp_zebra_connected;
        zclient->router_id_update = vrrp_router_id_update_zebra;
-       zclient->interface_delete = vrrp_zebra_if_del;
        zclient->interface_address_add = vrrp_zebra_if_address_add;
        zclient->interface_address_delete = vrrp_zebra_if_address_del;