dlm: dump address of unknown node
authorMasatake YAMATO <yamato@redhat.com>
Mon, 4 Jul 2011 03:25:51 +0000 (12:25 +0900)
committerDavid Teigland <teigland@redhat.com>
Wed, 6 Jul 2011 21:37:23 +0000 (16:37 -0500)
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>
fs/dlm/lowcomms.c

index 5e2c71f05e461bdb3f1f9e8f15329e9439bda393..990626e7da80aaf411c67f8e20ca73ac3a46bc0a 100644 (file)
@@ -512,12 +512,10 @@ static void process_sctp_notification(struct connection *con,
                        }
                        make_sockaddr(&prim.ssp_addr, 0, &addr_len);
                        if (dlm_addr_to_nodeid(&prim.ssp_addr, &nodeid)) {
-                               int i;
                                unsigned char *b=(unsigned char *)&prim.ssp_addr;
                                log_print("reject connect from unknown addr");
-                               for (i=0; i<sizeof(struct sockaddr_storage);i++)
-                                       printk("%02x ", b[i]);
-                               printk("\n");
+                               print_hex_dump_bytes("ss: ", DUMP_PREFIX_NONE, 
+                                                    b, sizeof(struct sockaddr_storage));
                                sctp_send_shutdown(prim.ssp_assoc_id);
                                return;
                        }
@@ -748,7 +746,10 @@ static int tcp_accept_from_sock(struct connection *con)
        /* Get the new node's NODEID */
        make_sockaddr(&peeraddr, 0, &len);
        if (dlm_addr_to_nodeid(&peeraddr, &nodeid)) {
+               unsigned char *b=(unsigned char *)&peeraddr;
                log_print("connect from non cluster node");
+               print_hex_dump_bytes("ss: ", DUMP_PREFIX_NONE, 
+                                    b, sizeof(struct sockaddr_storage));
                sock_release(newsock);
                mutex_unlock(&con->sock_mutex);
                return -1;
This page took 0.025568 seconds and 5 git commands to generate.