Well.... It won't necessarily fail will it? If you specified the source address as another port on the same machine, but NOT the one with connectivity to the remote peer, the routine will succeed, but the results are not what you expect...and you will fail further down the line (looking up the path record). This is one of the "bizarre" failures I was originally referring to.
By the way, the function name is addr_resolve_local, not ip_xxx ... sorry. On Fri, 2005-11-04 at 12:33 -0600, Steve Wise wrote: > i misunderstood. > > I didn't realize ip_resolve_local() will fail if the address it a remote > address. > > nevermind... > > :-\ > > > > ----- Original Message ----- > From: "Fab Tillier" <[EMAIL PROTECTED]> > To: "'Steve Wise'" <[EMAIL PROTECTED]>; "Sean Hefty" > <[EMAIL PROTECTED]>; "Tom Tucker" <[EMAIL PROTECTED]> > Cc: <[email protected]> > Sent: Friday, November 04, 2005 12:33 PM > Subject: RE: [openib-general][PATCH] local device search with > sourceaddresswildcard > > > > From: Steve Wise [mailto:[EMAIL PROTECTED] > > Sent: Friday, November 04, 2005 10:23 AM > > > > ----- Original Message ----- > > From: "Sean Hefty" <[EMAIL PROTECTED]> > > To: "Tom Tucker" <[EMAIL PROTECTED]> > > Cc: <[email protected]> > > > > > 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... > > If the destination address is on the local system, then the user is > establishing > a loopback connection. I think that if the user didn't specify a source > address, returning the same address as the destination should give the > proper > results. > > For loopback connections, source and destination can (and will likely) > be the > same. > > - Fab _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
