[openib-general] Re: [PATCH] ib_addr: local/loopback address handling

Sean Hefty mshefty at ichips.intel.com
Wed Mar 29 11:46:07 PST 2006


Michael S. Tsirkin wrote:
>>	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);
>>	}
> 
> 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 ...

After some testing, this appears to work the way I expected anyway.

My test system has a local IP address of 192.168.0.102.

I could connect from 127.0.0.1 to 127.0.0.1, 192.168.0.102 to 127.0.0.1, and 
127.0.0.1 to 192.168.0.102.  I could not connect between 127.0.0.1 to 
192.168.0.101, which is my other test system.

I believe that this does carry 127.0.0.1 in the connection messages, since 
that's the address that we're bound to.

- Sean



More information about the general mailing list