----- Original Message -----
From: "Sean Hefty" <[EMAIL PROTECTED]>
To: "Tom Tucker" <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Friday, November 04, 2005 11:36 AM
Subject: Re: [openib-general][PATCH] local device search with source
addresswildcard
Tom Tucker wrote:
Sean:
I was looking through ip_resolve_local and it looks to me like
if the source address is 0, it will end up getting set to the
destination IP instead of the IP address of the local interface.
The intent of ip_resolve_local() is to check if a given destination
address is on the local system. If it is and no source address is
specified, then the source address is set to the same address as the
destination.
This doesn't sound correct to me. The src ip address is supposed to be
the local ip address to be used for establishing the connection. If you
set it to the destination address, then you'd end up passing that
address to the peer in the private data, and that is incorrect...
Also if ip_dev_find can't find a local interface with connectivity to
the specified remote peer, shouldn't the error be EHOSTUNREACH?
If the address is not a local address, then a check is made to find a
route to that address assuming that it exists somewhere remotely. See
ib_resolve_addr() which calls ip_resolve_local() and
ip_resolve_remote(). So, the return code from ip_resolve_local()
returns that the given address is not available on the local system.
The address may still be reachable as a remote address.
Finally, if the user specifies a bogus source address, we don't
compare it against the source address configured on the local
interface found in the route. It will probably still fail later, but
in some bizarre fashion.
If the source address is bogus, then the call to ib_translate_addr()
will fail with EADDRNOTAVAIL.
I'm not tied to the return codes, so if one of them works better than
the other, I can change it.
- Sean
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit
http://openib.org/mailman/listinfo/openib-general
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general