Quoting r. Sean Hefty <[EMAIL PROTECTED]>:
> Subject: Re: [openib-general] [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

Makes sense to me. Does it work as expected?

-- 
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to