diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-12-09 11:49:22 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-09 11:49:22 -0500 |
| commit | 327c3aad2a08021ef2e4239bd0df123fa2845fbd (patch) | |
| tree | 7b36f9accfb5ef9bb3cf4f184e66a3cbd87a5499 /ospfd/ospf_zebra.c | |
| parent | e386d2b15419382d3cf00a6cd986fbdc723b48f5 (diff) | |
| parent | cb135cc94303d2581987645f124bd6d4cecd80a6 (diff) | |
Merge pull request #7686 from volta-networks/fix_ldpsync_igps_detect_client_close
isisd, ospfd: IGPs detect LDP down via zapi client close message
Diffstat (limited to 'ospfd/ospf_zebra.c')
| -rw-r--r-- | ospfd/ospf_zebra.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index e7dbdbd9af..93d4ee0ec7 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -1986,6 +1986,20 @@ stream_failure: return ret; } +static int ospf_zebra_client_close_notify(ZAPI_CALLBACK_ARGS) +{ + int ret = 0; + + struct zapi_client_close_info info; + + if (zapi_client_close_notify_decode(zclient->ibuf, &info) < 0) + return -1; + + ospf_ldp_sync_handle_client_close(&info); + + return ret; +} + void ospf_zebra_init(struct thread_master *master, unsigned short instance) { /* Allocate zebra structure. */ @@ -2021,6 +2035,8 @@ void ospf_zebra_init(struct thread_master *master, unsigned short instance) prefix_list_delete_hook(ospf_prefix_list_update); zclient->opaque_msg_handler = ospf_opaque_msg_handler; + + zclient->zebra_client_close_notify = ospf_zebra_client_close_notify; } void ospf_zebra_send_arp(const struct interface *ifp, const struct prefix *p) |
