diff options
author | Hiroki Shirokura <slank.dev@gmail.com> | 2021-03-22 02:45:33 +0100 |
---|---|---|
committer | Mark Stapp <mjs@voltanet.io> | 2021-06-02 16:24:48 +0200 |
commit | a9510347aa9126fbbca09679a170b10c63ef851c (patch) | |
tree | d5e1696cd76f2e0c2ed0e5c8f2e7a9014a836895 /zebra | |
parent | lib: erase wrong comments by copy-paste (diff) | |
download | frr-a9510347aa9126fbbca09679a170b10c63ef851c.tar.xz frr-a9510347aa9126fbbca09679a170b10c63ef851c.zip |
zebra: delete unneeded zebra_srv6_manager_connect
Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/zapi_msg.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 4331487b8..4f6663fe2 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -1137,29 +1137,6 @@ static int zsend_table_manager_connect_response(struct zserv *client, return zserv_send_message(client, s); } -static int zsend_srv6_manager_connect_response(struct zserv *client, - vrf_id_t vrf_id, - uint16_t result) -{ - struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ); - - zclient_create_header(s, ZEBRA_SRV6_MANAGER_CONNECT, vrf_id); - - /* proto */ - stream_putc(s, client->proto); - - /* instance */ - stream_putw(s, client->instance); - - /* result */ - stream_putc(s, result); - - /* Write packet size. */ - stream_putw_at(s, 0, stream_get_endp(s)); - - return zserv_send_message(client, s); -} - /* Inbound message handling ------------------------------------------------ */ const int cmd2type[] = { @@ -2656,47 +2633,6 @@ int zsend_client_close_notify(struct zserv *client, struct zserv *closed_client) return zserv_send_message(client, s); } -/* Send response to a srv6 manager connect request to client */ -static void zread_srv6_manager_connect(struct zserv *client, - struct stream *msg, vrf_id_t vrf_id) -{ - struct stream *s; - uint8_t proto; - uint16_t instance; - struct vrf *vrf = vrf_lookup_by_id(vrf_id); - - s = msg; - - /* Get data. */ - STREAM_GETC(s, proto); - STREAM_GETW(s, instance); - - /* accept only dynamic routing protocols */ - if ((proto >= ZEBRA_ROUTE_MAX) || (proto <= ZEBRA_ROUTE_STATIC)) { - flog_err(EC_ZEBRA_TM_WRONG_PROTO, - "client %d has wrong protocol %s", client->sock, - zebra_route_string(proto)); - zsend_srv6_manager_connect_response(client, vrf_id, 1); - return; - } - zlog_notice("client %d with vrf %s(%u) instance %u connected as %s", - client->sock, VRF_LOGNAME(vrf), vrf_id, instance, - zebra_route_string(proto)); - client->proto = proto; - client->instance = instance; - - /* - * Release previous locators of same protocol and instance. - * This is done in case it restarted from an unexpected shutdown. - */ - release_daemon_srv6_locator_chunks(client); - - zsend_srv6_manager_connect_response(client, vrf_id, 0); - -stream_failure: - return; -} - int zsend_srv6_manager_get_locator_chunk_response(struct zserv *client, vrf_id_t vrf_id, struct srv6_locator *loc) @@ -2983,9 +2919,6 @@ stream_failure: static void zread_srv6_manager_request(ZAPI_HANDLER_ARGS) { switch (hdr->command) { - case ZEBRA_SRV6_MANAGER_CONNECT: - zread_srv6_manager_connect(client, msg, zvrf_id(zvrf)); - break; case ZEBRA_SRV6_MANAGER_GET_LOCATOR_CHUNK: zread_srv6_manager_get_locator_chunk(client, msg, zvrf_id(zvrf)); @@ -3759,7 +3692,6 @@ void (*const zserv_handlers[])(ZAPI_HANDLER_ARGS) = { [ZEBRA_MLAG_CLIENT_REGISTER] = zebra_mlag_client_register, [ZEBRA_MLAG_CLIENT_UNREGISTER] = zebra_mlag_client_unregister, [ZEBRA_MLAG_FORWARD_MSG] = zebra_mlag_forward_client_msg, - [ZEBRA_SRV6_MANAGER_CONNECT] = zread_srv6_manager_request, [ZEBRA_SRV6_MANAGER_GET_LOCATOR_CHUNK] = zread_srv6_manager_request, [ZEBRA_SRV6_MANAGER_RELEASE_LOCATOR_CHUNK] = zread_srv6_manager_request, [ZEBRA_CLIENT_CAPABILITIES] = zread_client_capabilities, |