Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Mar 2009 21:30:13 -0400 (EDT)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Julian Elischer <julian@elischer.org>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: getting a callback ip address for nfsv4 client
Message-ID:  <Pine.GSO.4.63.0903312118050.4012@muncher.cs.uoguelph.ca>
In-Reply-To: <49D27DDF.9@elischer.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help


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?

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?Pine.GSO.4.63.0903312118050.4012>