Skip to content

Commit

Permalink
UCP/WIREUP/CM: handle connection request from uninitialized device
Browse files Browse the repository at this point in the history
If listener is stared on any address and device is configured after UCP
initialization, client can try to connect to new available address but
server is not able to handle it, so print error and return unreachable
status.
  • Loading branch information
evgeny-leksikov committed Oct 15, 2020
1 parent bf27c99 commit 7e60324
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/ucp/wireup/wireup_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,16 @@ ucp_ep_cm_server_create_connected(ucp_worker_h worker, unsigned ep_init_flags,
const ucp_address_entry_t *address;
ucp_ep_h ep;
ucs_status_t status;
char client_addr_str[UCS_SOCKADDR_STRING_LEN];

if (tl_bitmap == 0) {
ucs_error("listener %p: got connection request from %s on uninitialized device %s",
conn_request->listener,
ucs_sockaddr_str((struct sockaddr*)&conn_request->client_address,
client_addr_str, sizeof(client_addr_str)),
conn_request->dev_name);
return UCS_ERR_UNREACHABLE;
}

ucp_unpacked_address_for_each(address, remote_addr) {
num_remote_ep_addrs += address->num_ep_addrs;
Expand Down

0 comments on commit 7e60324

Please sign in to comment.