Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Mar 2009 21:00:17 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Rick Macklem <rmacklem@uoguelph.ca>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: getting a callback ip address for nfsv4 client
Message-ID:  <49D2E6D1.7000106@elischer.org>
In-Reply-To: <Pine.GSO.4.63.0903312118050.4012@muncher.cs.uoguelph.ca>
References:  <Pine.GSO.4.63.0903301733120.17182@muncher.cs.uoguelph.ca> <49D13E9C.8010005@elischer.org> <Pine.GSO.4.63.0903311604100.15846@muncher.cs.uoguelph.ca> <49D27DDF.9@elischer.org> <Pine.GSO.4.63.0903312118050.4012@muncher.cs.uoguelph.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
Rick Macklem wrote:
> 
> 
> On Tue, 31 Mar 2009, Julian Elischer wrote:
> 
>>
>> looks about right (without doing great analysis).
>>
>> You may be able to make it a bit simpler by calling rtalloc1() directly..
> 
> Yep, I can see it would be. Is there a preferred interface or should I
> just recode it using rtalloc1()?
> 
>>
>> As there are possibly many addresses on an interface, one needs
>> to look for the one that has the same network as the gateway..(if
>> it's not p2p). e.g. if you have 10.2.2.2/24 and 10.3.3.3/24 on
>> an interface and the gateway is 10.3.3.1, then you obviously
>> need to select the second address on that interface.
>>
> I've been looking at this and it seems to me that it "falls out in the
> wash". It looks like in_pcbladdr() is what udp uses for this case and
> it just takes the rt_ifa->... as the address.
> 
> It seems like there is a separate routing table entry for each address
> on an interface and that the search done by rtalloc() should get the 
> correct one from what I can see. Does that make sense?
> 

yes as long as you take the ifa you should end up with the right one.
but if you just take the ifp you need to refine to the right ifa.


> Anyhow, thanks a lot for the help, rick




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49D2E6D1.7000106>