Date: Sun, 5 Apr 2009 15:33:53 -0400 (EDT) From: Rick Macklem <rmacklem@uoguelph.ca> To: Robert Watson <rwatson@FreeBSD.org> Cc: freebsd-arch@FreeBSD.org Subject: Re: getting a callback ip address for nfsv4 client Message-ID: <Pine.GSO.4.63.0904051522080.8769@muncher.cs.uoguelph.ca> In-Reply-To: <alpine.BSF.2.00.0904051826550.12639@fledge.watson.org> References: <Pine.GSO.4.63.0903301733120.17182@muncher.cs.uoguelph.ca> <alpine.BSF.2.00.0904051826550.12639@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.63.0904051522080.8769>