summaryrefslogtreecommitdiffstats
path: root/lib/zclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/zclient.c')
-rw-r--r--lib/zclient.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index 0540b129b..6ba71eba4 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -1592,6 +1592,20 @@ struct interface *zebra_interface_state_read(struct stream *s, vrf_id_t vrf_id)
return ifp;
}
+static void zclient_interface_delete(struct zclient *zclient, vrf_id_t vrf_id)
+{
+ struct interface *ifp;
+ struct stream *s = zclient->ibuf;
+
+ ifp = zebra_interface_state_read(s, vrf_id);
+
+ if (ifp == NULL)
+ return;
+
+ if_destroy_via_zapi(ifp);
+ return;
+}
+
static void zclient_interface_up(struct zclient *zclient, vrf_id_t vrf_id)
{
struct interface *ifp;
@@ -2818,9 +2832,7 @@ static int zclient_read(struct thread *thread)
zclient_interface_add(zclient, vrf_id);
break;
case ZEBRA_INTERFACE_DELETE:
- if (zclient->interface_delete)
- (*zclient->interface_delete)(command, zclient, length,
- vrf_id);
+ zclient_interface_delete(zclient, vrf_id);
break;
case ZEBRA_INTERFACE_ADDRESS_ADD:
if (zclient->interface_address_add)