[prev in list] [next in list] [prev in thread] [next in thread] 

List:       redhat-linux-cluster
Subject:    Re: [Linux-cluster] [PATCH] dumping the unknown address when got a
From:       David Teigland <teigland () redhat ! com>
Date:       2011-07-01 17:41:36
Message-ID: 20110701174136.GC23008 () redhat ! com
[Download RAW message or body]

On Fri, Jul 01, 2011 at 04:26:58PM +0900, Masatake YAMATO wrote:
> Another patch useful for debugging cluster.conf and network configuration.
> 
> This is useful when you build a cluster with nodes connected each others with
> a software bridge(virbrN). If you install wrong iptabels configuration, dlm
> cannot establish connections. You will just see 
> 
>        dlm: connect from non cluster node
> 
> in demsg. It is difficult to understand what happens quickly.
> This patch dumps the address of the non cluster node.
> 
> 
> Signed-off-by: Masatake YAMATO <yamato@redhat.com>
> 
> diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
> index bffa1e7..90c1c2e 100644
> --- a/fs/dlm/lowcomms.c
> +++ b/fs/dlm/lowcomms.c
> @@ -748,7 +748,12 @@ 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)) {
> +		int i;
> +		unsigned char *b=(unsigned char *)&peeraddr;
>  		log_print("connect from non cluster node");
> +		for (i=0; i<sizeof(struct sockaddr_storage);i++)
> +			printk("%02x ", b[i]);
> +		printk("\n");
>  		sock_release(newsock);
>  		mutex_unlock(&con->sock_mutex);
>  		return -1;

Could you use print_hex_dump_bytes instead?
Dave

--
Linux-cluster mailing list
Linux-cluster@redhat.com
https://www.redhat.com/mailman/listinfo/linux-cluster
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic