diff --git a/doc/user/sharp.rst b/doc/user/sharp.rst index 355b6b4d596b..2be38a31df69 100644 --- a/doc/user/sharp.rst +++ b/doc/user/sharp.rst @@ -63,6 +63,11 @@ keyword. At present, no sharp commands will be preserved in the config. Install a label into the kernel that causes the specified vrf NAME table to be used for pop and forward operations when the specified label is seen. +.. clicmd:: sharp watch [vrf VRF_NAME] neighbor + + Instruct zebra to notify sharpd about neighbor events in the specified vrf. + If no vrf is specified then assume default. + .. clicmd:: sharp watch |import [connected] Instruct zebra to monitor and notify sharp when the specified nexthop is diff --git a/lib/log.c b/lib/log.c index b18b37efa3f5..969ca7925660 100644 --- a/lib/log.c +++ b/lib/log.c @@ -444,11 +444,11 @@ static const struct zebra_desc_table command_types[] = { DESC_ENTRY(ZEBRA_NEIGH_DISCOVER), DESC_ENTRY(ZEBRA_ROUTE_NOTIFY_REQUEST), DESC_ENTRY(ZEBRA_CLIENT_CLOSE_NOTIFY), - DESC_ENTRY(ZEBRA_NHRP_NEIGH_ADDED), - DESC_ENTRY(ZEBRA_NHRP_NEIGH_REMOVED), - DESC_ENTRY(ZEBRA_NHRP_NEIGH_GET), - DESC_ENTRY(ZEBRA_NHRP_NEIGH_REGISTER), - DESC_ENTRY(ZEBRA_NHRP_NEIGH_UNREGISTER), + DESC_ENTRY(ZEBRA_NEIGH_ADDED), + DESC_ENTRY(ZEBRA_NEIGH_REMOVED), + DESC_ENTRY(ZEBRA_NEIGH_GET), + DESC_ENTRY(ZEBRA_NEIGH_REGISTER), + DESC_ENTRY(ZEBRA_NEIGH_UNREGISTER), DESC_ENTRY(ZEBRA_NEIGH_IP_ADD), DESC_ENTRY(ZEBRA_NEIGH_IP_DEL), DESC_ENTRY(ZEBRA_CONFIGURE_ARP), diff --git a/lib/zclient.c b/lib/zclient.c index 2a7d2a8c5bc1..25c6e2b8e559 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -4709,7 +4709,7 @@ static int zclient_neigh_ip_read_entry(struct stream *s, struct ipaddr *add) int zclient_neigh_ip_encode(struct stream *s, uint16_t cmd, union sockunion *in, union sockunion *out, struct interface *ifp, - int ndm_state) + int ndm_state, int ip_len) { int ret = 0; @@ -4722,6 +4722,7 @@ int zclient_neigh_ip_encode(struct stream *s, uint16_t cmd, union sockunion *in, sockunion_get_addrlen(out)); } else stream_putc(s, AF_UNSPEC); + stream_putl(s, ip_len); stream_putl(s, ifp->ifindex); if (out) stream_putl(s, ndm_state); @@ -4739,6 +4740,7 @@ int zclient_neigh_ip_decode(struct stream *s, struct zapi_neigh_ip *api) return -1; zclient_neigh_ip_read_entry(s, &api->ip_out); + STREAM_GETL(s, api->ip_len); STREAM_GETL(s, api->index); STREAM_GETL(s, api->ndm_state); return 0; @@ -4885,3 +4887,23 @@ enum zclient_send_status zclient_opaque_drop_notify(struct zclient *zclient, return zclient_send_message(zclient); } + +void zclient_register_neigh(struct zclient *zclient, vrf_id_t vrf_id, afi_t afi, + bool reg) +{ + struct stream *s; + + if (!zclient || zclient->sock < 0) + return; + + s = zclient->obuf; + stream_reset(s); + + zclient_create_header(s, + reg ? ZEBRA_NEIGH_REGISTER + : ZEBRA_NEIGH_UNREGISTER, + vrf_id); + stream_putw(s, afi); + stream_putw_at(s, 0, stream_get_endp(s)); + zclient_send_message(zclient); +} diff --git a/lib/zclient.h b/lib/zclient.h index 8d7faeb223d5..3027c2c37846 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -216,11 +216,11 @@ typedef enum { ZEBRA_NEIGH_DISCOVER, ZEBRA_ROUTE_NOTIFY_REQUEST, ZEBRA_CLIENT_CLOSE_NOTIFY, - ZEBRA_NHRP_NEIGH_ADDED, - ZEBRA_NHRP_NEIGH_REMOVED, - ZEBRA_NHRP_NEIGH_GET, - ZEBRA_NHRP_NEIGH_REGISTER, - ZEBRA_NHRP_NEIGH_UNREGISTER, + ZEBRA_NEIGH_ADDED, + ZEBRA_NEIGH_REMOVED, + ZEBRA_NEIGH_GET, + ZEBRA_NEIGH_REGISTER, + ZEBRA_NEIGH_UNREGISTER, ZEBRA_NEIGH_IP_ADD, ZEBRA_NEIGH_IP_DEL, ZEBRA_CONFIGURE_ARP, @@ -867,6 +867,7 @@ extern const struct zclient_options zclient_options_auxiliary; struct zapi_neigh_ip { int cmd; + int ip_len; struct ipaddr ip_in; struct ipaddr ip_out; ifindex_t index; @@ -875,7 +876,7 @@ struct zapi_neigh_ip { int zclient_neigh_ip_decode(struct stream *s, struct zapi_neigh_ip *api); int zclient_neigh_ip_encode(struct stream *s, uint16_t cmd, union sockunion *in, union sockunion *out, struct interface *ifp, - int ndm_state); + int ndm_state, int ip_len); /* * We reserve the top 4 bits for l2-NHG, everything else @@ -1322,6 +1323,9 @@ enum zapi_opaque_registry { */ extern enum zclient_send_status zclient_send_hello(struct zclient *client); +extern void zclient_register_neigh(struct zclient *zclient, vrf_id_t vrf_id, + afi_t afi, bool reg); + extern enum zclient_send_status zclient_send_neigh_discovery_req(struct zclient *zclient, const struct interface *ifp, diff --git a/nhrpd/netlink_arp.c b/nhrpd/netlink_arp.c index bcecf9fc09b0..88628999abfb 100644 --- a/nhrpd/netlink_arp.c +++ b/nhrpd/netlink_arp.c @@ -154,6 +154,10 @@ int nhrp_neighbor_operation(ZAPI_CALLBACK_ARGS) struct zapi_neigh_ip api = {}; zclient_neigh_ip_decode(zclient->ibuf, &api); + + if (api.ip_len != IPV4_MAX_BYTELEN && api.ip_len != 0) + return 0; + if (api.ip_in.ipa_type == AF_UNSPEC) return 0; sockunion_family(&addr) = api.ip_in.ipa_type; @@ -176,12 +180,11 @@ int nhrp_neighbor_operation(ZAPI_CALLBACK_ARGS) return 0; debugf(NHRP_DEBUG_KERNEL, "Netlink: %s %pSU dev %s lladdr %pSU nud 0x%x cache used %u type %u", - (cmd == ZEBRA_NHRP_NEIGH_GET) - ? "who-has" - : (cmd == ZEBRA_NHRP_NEIGH_ADDED) ? "new-neigh" - : "del-neigh", + (cmd == ZEBRA_NEIGH_GET) ? "who-has" + : (cmd == ZEBRA_NEIGH_ADDED) ? "new-neigh" + : "del-neigh", &addr, ifp->name, &lladdr, ndm_state, c->used, c->cur.type); - if (cmd == ZEBRA_NHRP_NEIGH_GET) { + if (cmd == ZEBRA_NEIGH_GET) { if (c->cur.type >= NHRP_CACHE_CACHED) { nhrp_cache_set_used(c, 1); debugf(NHRP_DEBUG_KERNEL, @@ -194,8 +197,8 @@ int nhrp_neighbor_operation(ZAPI_CALLBACK_ARGS) netlink_update_binding(ifp, &addr, &lladdr); } } else { - state = (cmd == ZEBRA_NHRP_NEIGH_ADDED) ? ndm_state - : ZEBRA_NEIGH_STATE_FAILED; + state = (cmd == ZEBRA_NEIGH_ADDED) ? ndm_state + : ZEBRA_NEIGH_STATE_FAILED; nhrp_cache_set_used(c, state == ZEBRA_NEIGH_STATE_REACHABLE); } return 0; diff --git a/nhrpd/nhrp_route.c b/nhrpd/nhrp_route.c index 060e60314d73..c05a8a3ba25d 100644 --- a/nhrpd/nhrp_route.c +++ b/nhrpd/nhrp_route.c @@ -75,24 +75,6 @@ static void nhrp_route_update_zebra(const struct prefix *p, } } -static void nhrp_zebra_register_neigh(vrf_id_t vrf_id, afi_t afi, bool reg) -{ - struct stream *s; - - if (!zclient || zclient->sock < 0) - return; - - s = zclient->obuf; - stream_reset(s); - - zclient_create_header(s, reg ? ZEBRA_NHRP_NEIGH_REGISTER : - ZEBRA_NHRP_NEIGH_UNREGISTER, - vrf_id); - stream_putw(s, afi); - stream_putw_at(s, 0, stream_get_endp(s)); - zclient_send_message(zclient); -} - void nhrp_route_update_nhrp(const struct prefix *p, struct interface *ifp) { struct route_node *rn; @@ -368,8 +350,8 @@ static void nhrp_zebra_connected(struct zclient *zclient) ZEBRA_ROUTE_ALL, 0, VRF_DEFAULT); zebra_redistribute_send(ZEBRA_REDISTRIBUTE_ADD, zclient, AFI_IP6, ZEBRA_ROUTE_ALL, 0, VRF_DEFAULT); - nhrp_zebra_register_neigh(VRF_DEFAULT, AFI_IP, true); - nhrp_zebra_register_neigh(VRF_DEFAULT, AFI_IP6, true); + zclient_register_neigh(zclient, VRF_DEFAULT, AFI_IP, true); + zclient_register_neigh(zclient, VRF_DEFAULT, AFI_IP6, true); } static zclient_handler *const nhrp_handlers[] = { @@ -377,9 +359,9 @@ static zclient_handler *const nhrp_handlers[] = { [ZEBRA_INTERFACE_ADDRESS_DELETE] = nhrp_interface_address_delete, [ZEBRA_REDISTRIBUTE_ROUTE_ADD] = nhrp_route_read, [ZEBRA_REDISTRIBUTE_ROUTE_DEL] = nhrp_route_read, - [ZEBRA_NHRP_NEIGH_ADDED] = nhrp_neighbor_operation, - [ZEBRA_NHRP_NEIGH_REMOVED] = nhrp_neighbor_operation, - [ZEBRA_NHRP_NEIGH_GET] = nhrp_neighbor_operation, + [ZEBRA_NEIGH_ADDED] = nhrp_neighbor_operation, + [ZEBRA_NEIGH_REMOVED] = nhrp_neighbor_operation, + [ZEBRA_NEIGH_GET] = nhrp_neighbor_operation, [ZEBRA_GRE_UPDATE] = nhrp_gre_update, }; @@ -456,10 +438,11 @@ void nhrp_send_zebra_nbr(union sockunion *in, return; s = zclient->obuf; stream_reset(s); - zclient_neigh_ip_encode(s, out ? ZEBRA_NEIGH_IP_ADD : - ZEBRA_NEIGH_IP_DEL, in, out, - ifp, out ? ZEBRA_NEIGH_STATE_REACHABLE - : ZEBRA_NEIGH_STATE_FAILED); + zclient_neigh_ip_encode(s, out ? ZEBRA_NEIGH_IP_ADD : ZEBRA_NEIGH_IP_DEL, + in, out, ifp, + out ? ZEBRA_NEIGH_STATE_REACHABLE + : ZEBRA_NEIGH_STATE_FAILED, + 0); stream_putw_at(s, 0, stream_get_endp(s)); zclient_send_message(zclient); } @@ -471,8 +454,8 @@ int nhrp_send_zebra_gre_request(struct interface *ifp) void nhrp_zebra_terminate(void) { - nhrp_zebra_register_neigh(VRF_DEFAULT, AFI_IP, false); - nhrp_zebra_register_neigh(VRF_DEFAULT, AFI_IP6, false); + zclient_register_neigh(zclient, VRF_DEFAULT, AFI_IP, false); + zclient_register_neigh(zclient, VRF_DEFAULT, AFI_IP6, false); zclient_stop(zclient); zclient_free(zclient); diff --git a/sharpd/sharp_vty.c b/sharpd/sharp_vty.c index cf79bacc6b6e..1df765614467 100644 --- a/sharpd/sharp_vty.c +++ b/sharpd/sharp_vty.c @@ -27,6 +27,32 @@ DEFINE_MTYPE_STATIC(SHARPD, SRV6_LOCATOR, "SRv6 Locator"); +DEFPY(watch_neighbor, watch_neighbor_cmd, + "sharp watch [vrf NAME$vrf_name] neighbor", + "Sharp routing Protocol\n" + "Watch for changes\n" + "The vrf we would like to watch if non-default\n" + "The NAME of the vrf\n" + "Neighbor events\n") +{ + struct vrf *vrf; + + if (!vrf_name) + vrf_name = VRF_DEFAULT_NAME; + vrf = vrf_lookup_by_name(vrf_name); + + if (!vrf) { + vty_out(vty, "The vrf NAME specified: %s does not exist\n", + vrf_name); + return CMD_WARNING; + } + + sharp_zebra_register_neigh(vrf->vrf_id, AFI_IP, true); + + return CMD_SUCCESS; +} + + DEFPY(watch_redistribute, watch_redistribute_cmd, "sharp watch [vrf NAME$vrf_name] redistribute " FRR_REDIST_STR_SHARPD, "Sharp routing Protocol\n" @@ -1419,6 +1445,7 @@ void sharp_vty_init(void) install_element(ENABLE_NODE, &remove_routes_cmd); install_element(ENABLE_NODE, &vrf_label_cmd); install_element(ENABLE_NODE, &sharp_nht_data_dump_cmd); + install_element(ENABLE_NODE, &watch_neighbor_cmd); install_element(ENABLE_NODE, &watch_redistribute_cmd); install_element(ENABLE_NODE, &watch_nexthop_v6_cmd); install_element(ENABLE_NODE, &watch_nexthop_v4_cmd); diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c index cbfa0d1cccec..6588300daa5f 100644 --- a/sharpd/sharp_zebra.c +++ b/sharpd/sharp_zebra.c @@ -989,6 +989,41 @@ static int sharp_zebra_process_srv6_locator_chunk(ZAPI_CALLBACK_ARGS) return 0; } +static int sharp_zebra_process_neigh(ZAPI_CALLBACK_ARGS) +{ + union sockunion addr = {}, lladdr = {}; + struct zapi_neigh_ip api = {}; + struct interface *ifp; + + zlog_debug("Received a neighbor event"); + zclient_neigh_ip_decode(zclient->ibuf, &api); + + if (api.ip_in.ipa_type == AF_UNSPEC) + return 0; + + sockunion_family(&addr) = api.ip_in.ipa_type; + memcpy((uint8_t *)sockunion_get_addr(&addr), &api.ip_in.ip.addr, + family2addrsize(api.ip_in.ipa_type)); + + sockunion_family(&lladdr) = api.ip_out.ipa_type; + if (api.ip_out.ipa_type != AF_UNSPEC) + memcpy((uint8_t *)sockunion_get_addr(&lladdr), + &api.ip_out.ip.addr, + family2addrsize(api.ip_out.ipa_type)); + ifp = if_lookup_by_index(api.index, vrf_id); + if (!ifp) { + zlog_debug("Failed to lookup interface for neighbor entry: %u for %u", + api.index, vrf_id); + return 0; + } + + zlog_debug("Received: %s %pSU dev %s lladr %pSU", + (cmd = ZEBRA_NEIGH_ADDED) ? "NEW" : "DEL", &addr, ifp->name, + &lladdr); + + return 0; +} + int sharp_zebra_send_interface_protodown(struct interface *ifp, bool down) { zlog_debug("Sending zebra to set %s protodown %s", ifp->name, @@ -1059,6 +1094,12 @@ int sharp_zebra_send_tc_filter_rate(struct interface *ifp, return 0; } +void sharp_zebra_register_neigh(vrf_id_t vrf_id, afi_t afi, bool reg) +{ + zclient_register_neigh(zclient, vrf_id, afi, reg); +} + + static zclient_handler *const sharp_handlers[] = { [ZEBRA_INTERFACE_ADDRESS_ADD] = interface_address_add, [ZEBRA_INTERFACE_ADDRESS_DELETE] = interface_address_delete, @@ -1070,6 +1111,8 @@ static zclient_handler *const sharp_handlers[] = { [ZEBRA_OPAQUE_NOTIFY] = sharp_opq_notify_handler, [ZEBRA_SRV6_MANAGER_GET_LOCATOR_CHUNK] = sharp_zebra_process_srv6_locator_chunk, + [ZEBRA_NEIGH_ADDED] = sharp_zebra_process_neigh, + [ZEBRA_NEIGH_REMOVED] = sharp_zebra_process_neigh, }; void sharp_zebra_init(void) diff --git a/sharpd/sharp_zebra.h b/sharpd/sharp_zebra.h index 6314f862f57e..df80ce77a1cf 100644 --- a/sharpd/sharp_zebra.h +++ b/sharpd/sharp_zebra.h @@ -71,4 +71,6 @@ extern int sharp_zebra_send_tc_filter_rate(struct interface *ifp, const struct prefix *destination, uint8_t ip_proto, uint16_t src_port, uint16_t dst_port, uint64_t rate); + +extern void sharp_zebra_register_neigh(vrf_id_t vrf_id, afi_t afi, bool reg); #endif diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 98bb890eb682..f092fc5c85da 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -4242,11 +4242,11 @@ static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id) * - struct ethaddr mac; (for NEW) */ if (h->nlmsg_type == RTM_NEWNEIGH) - cmd = ZEBRA_NHRP_NEIGH_ADDED; + cmd = ZEBRA_NEIGH_ADDED; else if (h->nlmsg_type == RTM_GETNEIGH) - cmd = ZEBRA_NHRP_NEIGH_GET; + cmd = ZEBRA_NEIGH_GET; else if (h->nlmsg_type == RTM_DELNEIGH) - cmd = ZEBRA_NHRP_NEIGH_REMOVED; + cmd = ZEBRA_NEIGH_REMOVED; else { zlog_debug("%s(): unknown nlmsg type %u", __func__, h->nlmsg_type); @@ -4256,20 +4256,18 @@ static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id) /* copy LLADDR information */ l2_len = RTA_PAYLOAD(tb[NDA_LLADDR]); } - if (l2_len == IPV4_MAX_BYTELEN || l2_len == 0) { - union sockunion link_layer_ipv4; - if (l2_len) { - sockunion_family(&link_layer_ipv4) = AF_INET; - memcpy((void *)sockunion_get_addr(&link_layer_ipv4), - RTA_DATA(tb[NDA_LLADDR]), l2_len); - } else - sockunion_family(&link_layer_ipv4) = AF_UNSPEC; - zsend_nhrp_neighbor_notify( - cmd, ifp, &ip, - netlink_nbr_entry_state_to_zclient(ndm->ndm_state), - &link_layer_ipv4); - } + union sockunion link_layer_ipv4; + + if (l2_len) { + sockunion_family(&link_layer_ipv4) = AF_INET; + memcpy((void *)sockunion_get_addr(&link_layer_ipv4), + RTA_DATA(tb[NDA_LLADDR]), l2_len); + } else + sockunion_family(&link_layer_ipv4) = AF_UNSPEC; + zsend_neighbor_notify(cmd, ifp, &ip, + netlink_nbr_entry_state_to_zclient(ndm->ndm_state), + &link_layer_ipv4, l2_len); if (h->nlmsg_type == RTM_GETNEIGH) return 0; diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 761eafeb1375..296bf12bb5c5 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -968,9 +968,9 @@ void zsend_ipset_entry_notify_owner(const struct zebra_dplane_ctx *ctx, zserv_send_message(client, s); } -void zsend_nhrp_neighbor_notify(int cmd, struct interface *ifp, - struct ipaddr *ipaddr, int ndm_state, - union sockunion *link_layer_ipv4) +void zsend_neighbor_notify(int cmd, struct interface *ifp, + struct ipaddr *ipaddr, int ndm_state, + union sockunion *link_layer_ipv4, int ip_len) { struct stream *s; struct listnode *node, *nnode; @@ -987,13 +987,13 @@ void zsend_nhrp_neighbor_notify(int cmd, struct interface *ifp, family2addrsize(sockunion_family(&ip))); for (ALL_LIST_ELEMENTS(zrouter.client_list, node, nnode, client)) { - if (!vrf_bitmap_check(&client->nhrp_neighinfo[afi], + if (!vrf_bitmap_check(&client->neighinfo[afi], ifp->vrf->vrf_id)) continue; s = stream_new(ZEBRA_MAX_PACKET_SIZ); zclient_neigh_ip_encode(s, cmd, &ip, link_layer_ipv4, ifp, - ndm_state); + ndm_state, ip_len); stream_putw_at(s, 0, stream_get_endp(s)); zserv_send_message(client, s); } @@ -2431,7 +2431,7 @@ static void zread_vrf_unregister(ZAPI_HANDLER_ARGS) zvrf_id(zvrf)); vrf_bitmap_unset(&client->redist_default[afi], zvrf_id(zvrf)); vrf_bitmap_unset(&client->ridinfo[afi], zvrf_id(zvrf)); - vrf_bitmap_unset(&client->nhrp_neighinfo[afi], zvrf_id(zvrf)); + vrf_bitmap_unset(&client->neighinfo[afi], zvrf_id(zvrf)); } } @@ -3563,7 +3563,7 @@ static inline void zebra_neigh_register(ZAPI_HANDLER_ARGS) afi); goto stream_failure; } - vrf_bitmap_set(&client->nhrp_neighinfo[afi], zvrf_id(zvrf)); + vrf_bitmap_set(&client->neighinfo[afi], zvrf_id(zvrf)); stream_failure: return; } @@ -3579,7 +3579,7 @@ static inline void zebra_neigh_unregister(ZAPI_HANDLER_ARGS) afi); goto stream_failure; } - vrf_bitmap_unset(&client->nhrp_neighinfo[afi], zvrf_id(zvrf)); + vrf_bitmap_unset(&client->neighinfo[afi], zvrf_id(zvrf)); stream_failure: return; } @@ -3936,8 +3936,8 @@ void (*const zserv_handlers[])(ZAPI_HANDLER_ARGS) = { [ZEBRA_EVPN_REMOTE_NH_DEL] = zebra_evpn_proc_remote_nh, [ZEBRA_NEIGH_IP_ADD] = zebra_neigh_ip_add, [ZEBRA_NEIGH_IP_DEL] = zebra_neigh_ip_del, - [ZEBRA_NHRP_NEIGH_REGISTER] = zebra_neigh_register, - [ZEBRA_NHRP_NEIGH_UNREGISTER] = zebra_neigh_unregister, + [ZEBRA_NEIGH_REGISTER] = zebra_neigh_register, + [ZEBRA_NEIGH_UNREGISTER] = zebra_neigh_unregister, [ZEBRA_CONFIGURE_ARP] = zebra_configure_arp, [ZEBRA_GRE_GET] = zebra_gre_get, [ZEBRA_GRE_SOURCE_SET] = zebra_gre_source_set, diff --git a/zebra/zapi_msg.h b/zebra/zapi_msg.h index def1e8a1bdff..43f734d26e6d 100644 --- a/zebra/zapi_msg.h +++ b/zebra/zapi_msg.h @@ -91,9 +91,9 @@ extern int zsend_label_manager_connect_response(struct zserv *client, extern int zsend_sr_policy_notify_status(uint32_t color, struct ipaddr *endpoint, char *name, int status); -extern void zsend_nhrp_neighbor_notify(int cmd, struct interface *ifp, - struct ipaddr *ipaddr, int ndm_state, - union sockunion *link_layer_ipv4); +extern void zsend_neighbor_notify(int cmd, struct interface *ifp, + struct ipaddr *ipaddr, int ndm_state, + union sockunion *link_layer_ipv4, int ip_len); extern int zsend_client_close_notify(struct zserv *client, struct zserv *closed_client); diff --git a/zebra/zserv.c b/zebra/zserv.c index 1d3989dc733d..6a64176d98b3 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -637,7 +637,7 @@ static void zserv_client_free(struct zserv *client) vrf_bitmap_free(&client->redist_default[afi]); vrf_bitmap_free(&client->ridinfo[afi]); - vrf_bitmap_free(&client->nhrp_neighinfo[afi]); + vrf_bitmap_free(&client->neighinfo[afi]); } /* @@ -758,7 +758,7 @@ static struct zserv *zserv_client_create(int sock) vrf_bitmap_init(&client->redist[afi][i]); vrf_bitmap_init(&client->redist_default[afi]); vrf_bitmap_init(&client->ridinfo[afi]); - vrf_bitmap_init(&client->nhrp_neighinfo[afi]); + vrf_bitmap_init(&client->neighinfo[afi]); } /* Add this client to linked list. */ diff --git a/zebra/zserv.h b/zebra/zserv.h index 5e15d1fbc29f..4ab201b5ea15 100644 --- a/zebra/zserv.h +++ b/zebra/zserv.h @@ -121,7 +121,7 @@ struct zserv { vrf_bitmap_t ridinfo[AFI_MAX]; /* Router-id information. */ - vrf_bitmap_t nhrp_neighinfo[AFI_MAX]; + vrf_bitmap_t neighinfo[AFI_MAX]; bool notify_owner;