diff options
author | Masatake YAMATO <yamato@redhat.com> | 2011-07-03 23:25:51 -0400 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2011-07-06 17:37:23 -0400 |
commit | bcaadf5c1ac4ff84b52174a84adb86a1e3e806dd (patch) | |
tree | 780067c96456dec980e53e83aa7171ae74897738 /fs/dlm | |
parent | c282af49901679b63c139b8330b0aba027aa3b56 (diff) |
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>
Diffstat (limited to 'fs/dlm')
-rw-r--r-- | fs/dlm/lowcomms.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 5e2c71f05e46..990626e7da80 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c | |||
@@ -512,12 +512,10 @@ static void process_sctp_notification(struct connection *con, | |||
512 | } | 512 | } |
513 | make_sockaddr(&prim.ssp_addr, 0, &addr_len); | 513 | make_sockaddr(&prim.ssp_addr, 0, &addr_len); |
514 | if (dlm_addr_to_nodeid(&prim.ssp_addr, &nodeid)) { | 514 | if (dlm_addr_to_nodeid(&prim.ssp_addr, &nodeid)) { |
515 | int i; | ||
516 | unsigned char *b=(unsigned char *)&prim.ssp_addr; | 515 | unsigned char *b=(unsigned char *)&prim.ssp_addr; |
517 | log_print("reject connect from unknown addr"); | 516 | log_print("reject connect from unknown addr"); |
518 | for (i=0; i<sizeof(struct sockaddr_storage);i++) | 517 | print_hex_dump_bytes("ss: ", DUMP_PREFIX_NONE, |
519 | printk("%02x ", b[i]); | 518 | b, sizeof(struct sockaddr_storage)); |
520 | printk("\n"); | ||
521 | sctp_send_shutdown(prim.ssp_assoc_id); | 519 | sctp_send_shutdown(prim.ssp_assoc_id); |
522 | return; | 520 | return; |
523 | } | 521 | } |
@@ -748,7 +746,10 @@ static int tcp_accept_from_sock(struct connection *con) | |||
748 | /* Get the new node's NODEID */ | 746 | /* Get the new node's NODEID */ |
749 | make_sockaddr(&peeraddr, 0, &len); | 747 | make_sockaddr(&peeraddr, 0, &len); |
750 | if (dlm_addr_to_nodeid(&peeraddr, &nodeid)) { | 748 | if (dlm_addr_to_nodeid(&peeraddr, &nodeid)) { |
749 | unsigned char *b=(unsigned char *)&peeraddr; | ||
751 | log_print("connect from non cluster node"); | 750 | log_print("connect from non cluster node"); |
751 | print_hex_dump_bytes("ss: ", DUMP_PREFIX_NONE, | ||
752 | b, sizeof(struct sockaddr_storage)); | ||
752 | sock_release(newsock); | 753 | sock_release(newsock); |
753 | mutex_unlock(&con->sock_mutex); | 754 | mutex_unlock(&con->sock_mutex); |
754 | return -1; | 755 | return -1; |