getting a callback ip address for nfsv4 client

Rick Macklem rmacklem at uoguelph.ca
Sun Apr 5 12:27:47 PDT 2009



On Sun, 5 Apr 2009, Robert Watson wrote:

>
> One possibility is to connect() a socket to the server address, then call 
> getsockaddr() to query what address the network stack is using.  If the 
> connection completed, then the address could at least send packets to the 
> server, even if it isn't reachable from the server.
>
I used rtalloc1() and then rt_ifa->ifa_addr, which seems adequate,
as recommended by a couple of helpful folks. (I didn't bother to try and
filter through weird cases like the temporary ipv6 addresses, as one
person mentioned.) I put in a sysctl variable, so that this can be
overridden. (I think that's pretty much what the connect() would end
up doing, although I'm a tcp/ip midget, so I could be wayy wronnggg:-)

If it doesn't work, it's not a big tragedy, since a non-functioning
callback path just implies "don't issue delegations to the client".

rick


More information about the freebsd-arch mailing list