mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
dlm: dump address of unknown node
When the dlm fails to make a network connection to another node, include the address of the node in the error message. Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
parent
c282af4990
commit
bcaadf5c1a
1 changed files with 5 additions and 4 deletions
|
@ -512,12 +512,10 @@ static void process_sctp_notification(struct connection *con,
|
||||||
}
|
}
|
||||||
make_sockaddr(&prim.ssp_addr, 0, &addr_len);
|
make_sockaddr(&prim.ssp_addr, 0, &addr_len);
|
||||||
if (dlm_addr_to_nodeid(&prim.ssp_addr, &nodeid)) {
|
if (dlm_addr_to_nodeid(&prim.ssp_addr, &nodeid)) {
|
||||||
int i;
|
|
||||||
unsigned char *b=(unsigned char *)&prim.ssp_addr;
|
unsigned char *b=(unsigned char *)&prim.ssp_addr;
|
||||||
log_print("reject connect from unknown addr");
|
log_print("reject connect from unknown addr");
|
||||||
for (i=0; i<sizeof(struct sockaddr_storage);i++)
|
print_hex_dump_bytes("ss: ", DUMP_PREFIX_NONE,
|
||||||
printk("%02x ", b[i]);
|
b, sizeof(struct sockaddr_storage));
|
||||||
printk("\n");
|
|
||||||
sctp_send_shutdown(prim.ssp_assoc_id);
|
sctp_send_shutdown(prim.ssp_assoc_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -748,7 +746,10 @@ static int tcp_accept_from_sock(struct connection *con)
|
||||||
/* Get the new node's NODEID */
|
/* Get the new node's NODEID */
|
||||||
make_sockaddr(&peeraddr, 0, &len);
|
make_sockaddr(&peeraddr, 0, &len);
|
||||||
if (dlm_addr_to_nodeid(&peeraddr, &nodeid)) {
|
if (dlm_addr_to_nodeid(&peeraddr, &nodeid)) {
|
||||||
|
unsigned char *b=(unsigned char *)&peeraddr;
|
||||||
log_print("connect from non cluster node");
|
log_print("connect from non cluster node");
|
||||||
|
print_hex_dump_bytes("ss: ", DUMP_PREFIX_NONE,
|
||||||
|
b, sizeof(struct sockaddr_storage));
|
||||||
sock_release(newsock);
|
sock_release(newsock);
|
||||||
mutex_unlock(&con->sock_mutex);
|
mutex_unlock(&con->sock_mutex);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue