From owner-freebsd-arch@FreeBSD.ORG Sun Apr 12 22:25:36 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C914C1065670 for ; Sun, 12 Apr 2009 22:25:36 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by mx1.freebsd.org (Postfix) with ESMTP id 5A9A98FC14 for ; Sun, 12 Apr 2009 22:25:36 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-019-008.pools.arcor-ip.net [88.66.19.8]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0MKuxg-1Lt87K2864-0001IU; Mon, 13 Apr 2009 00:25:35 +0200 Received: (qmail 26748 invoked from network); 12 Apr 2009 22:25:32 -0000 Received: from fbsd8.laiers.local (192.168.4.200) by mx.laiers.local with SMTP; 12 Apr 2009 22:25:32 -0000 From: Max Laier Organization: FreeBSD To: freebsd-arch@freebsd.org Date: Sun, 12 Apr 2009 23:25:31 +0100 User-Agent: KMail/1.11.0 (FreeBSD/8.0-CURRENT; KDE/4.2.1; i386; ; ) References: <49E25816.9010907@freebsd.org> In-Reply-To: <49E25816.9010907@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904130025.31771.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1/LbckiVi/Z8MZvKddIINTE7ZHH20WmquKfowr +cjKwNWDYJUdIig14pSnpeE7qK1hHxGA/3NZbEwjVjGQK7iYJt eRxWiNdARuGircRdKFhGw== Cc: Tim Kientzle , Robert Watson , Julian Elischer , Rick Macklem Subject: Re: getting a callback ip address for nfsv4 client X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Apr 2009 22:25:37 -0000 On Sunday 12 April 2009 23:07:34 Tim Kientzle wrote: > > The second brings up the question of NAT, which I know diddly about. > > (I vaguely thought that neither rtalloc() nor getsockaddr() would work, > > since they would return 192.168.x.x and you really need the address > > assigned by the isp?) Can someone help w.r.t. what address to use > > when behind a NAT? > > In general, the client doesn't know what address to use > in this case. In fact, I've been a little confused by this > conversation all along. It sounds like the client is > looking up it's own address in order to tell the server > how to contact the client? Why? The server already > knows the source IP address on the incoming packets > from the client; that's much more robust than anything > the client could look up. Well, the client also needs to listen at the address - that is a local decision. This is much like the problem with active mode FTP - and it has the same problems with NAT (i.e. the NAT service must be aware of the protocol and translate the address inside). The alternative is to use things like UPnP to retrieve an external address mapping ... there are libraries to deal with that. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News