[openib-general] Re: [PATCH] ib_addr: local/loopback address	handling
    Michael S. Tsirkin 
    mst at mellanox.co.il
       
    Wed Mar 29 11:26:19 PST 2006
    
    
  
Quoting r. Sean Hefty <mshefty at ichips.intel.com>:
> Subject: Re: [PATCH] ib_addr: local/loopback address handling
> 
> Michael S. Tsirkin wrote:
> >And then the connection will fail since 127.0.0.1 is not an IB device.
> >So why is this behaviour useful?
> 
> My concern is that the user has bound to 127.0.0.1, and the code changes 
> that to a different address.  What if we tried something like the following 
> change to addr_resolve_local:
> 
> 	if (ZERONET(src_ip)) {
> 		src_in->sin_family = dst_in->sin_family;
> 		src_in->sin_addr.s_addr = dst_ip;
> 		ret = copy_addr(addr, dev, dev->dev_addr);
> 	} else if (LOOPBACK(src_ip)) {
> 		ret = rdma_translate_ip((struct sockaddr *)dst_in, addr);
> 		if (!ret)
> 			memcpy(addr->dst_dev_addr, dev->dev_addr, 
> 			MAX_ADDR_LEN);
> 	} else {
> 		ret = rdma_translate_ip((struct sockaddr *)src_in, addr);
> 		if (!ret)
> 			memcpy(addr->dst_dev_addr, dev->dev_addr, 
> 			MAX_ADDR_LEN);
> 	}
> 
> - Sean
This will put the IP of an actual IB device in the SDP hello message, right?
I don't think we should have 127.0.0.1 there ...
-- 
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies
    
    
More information about the general
mailing list