diff options
Diffstat (limited to 'lib/zclient.c')
| -rw-r--r-- | lib/zclient.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/zclient.c b/lib/zclient.c index 72367206b7..ac418addf3 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -761,6 +761,35 @@ memconstant(const void *s, int c, size_t n) return 1; } +struct interface* +zebra_interface_bfd_read (struct stream *s, struct prefix *p) +{ + unsigned int ifindex; + struct interface *ifp; + int plen; + + /* Get interface index. */ + ifindex = stream_getl (s); + + /* Lookup index. */ + ifp = if_lookup_by_index (ifindex); + if (ifp == NULL) + { + zlog_warn ("zebra_interface_bfd_read: " + "Can't find interface by ifindex: %d ", ifindex); + return NULL; + } + + /* Fetch interface address. */ + p->family = stream_getc (s); + + plen = prefix_blen (p); + stream_get (&p->u.prefix, s, plen); + p->prefixlen = stream_getc (s); + + return ifp; +} + struct connected * zebra_interface_address_read (int type, struct stream *s) { @@ -1026,6 +1055,10 @@ zclient_read (struct thread *thread) if (zclient->interface_address_delete) (*zclient->interface_address_delete) (command, zclient, length); break; + case ZEBRA_INTERFACE_BFD_DEST_DOWN: + if (zclient->interface_bfd_dest_down) + (*zclient->interface_bfd_dest_down) (command, zclient, length); + break; case ZEBRA_INTERFACE_NBR_ADDRESS_ADD: if (zclient->interface_nbr_address_add) (*zclient->interface_nbr_address_add) (command, zclient, length); |
