From owner-freebsd-current@FreeBSD.ORG Tue Dec 30 12:20:37 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42EDB1065672 for ; Tue, 30 Dec 2008 12:20:37 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id BCDAF8FC12 for ; Tue, 30 Dec 2008 12:20:36 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LHdaI-0000Vb-C4 for freebsd-current@freebsd.org; Tue, 30 Dec 2008 12:20:30 +0000 Received: from 195.208.174.178 ([195.208.174.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 30 Dec 2008 12:20:30 +0000 Received: from vadim_nuclight by 195.208.174.178 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 30 Dec 2008 12:20:30 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-current@freebsd.org From: Vadim Goncharov Date: Tue, 30 Dec 2008 12:20:21 +0000 (UTC) Organization: Nuclear Lightning @ Tomsk, TPU AVTF Hostel Lines: 36 Message-ID: References: <1229476796.49670.7.camel@shumai.marcuscom.com> <1229637745.60337.62.camel@shumai.marcuscom.com> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 195.208.174.178 X-Comment-To: Li, Qing User-Agent: slrn/0.9.8.1 (FreeBSD) Sender: news Subject: Re: NAT (ipfw/natd) broken in latest -CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vadim_nuclight@mail.ru List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 12:20:37 -0000 Hi Li, Qing! On Mon, 29 Dec 2008 11:55:01 -0800; Li, Qing wrote about 'RE: NAT (ipfw/natd) broken in latest -CURRENT': >>> I have checked in a fix for this issue (r186308), which turned out to >>> be a problem in the ppp module. The ppp module updates the p2p host >>> route that was installed during the tunnel configuration, however, the >>> ppp code always set the RTF_GATEWAY flag. The patch has been verified to >>> be working by Joe. >> Will it break again all the NAT-PMP using programs which need to determine >> IP-address of default gateway? Currently it works with mpd, which sets default >> gateway to correct IP, not an interface or self route. > I don't quite understand your question. > > The ppp route insertion code always set the RTF_GATEWAY flag > regardless whether the gateway information is present. > I fixed the code such that the RTF_GATEWAY is set only if > gateway is given. > > This ppp bug appears to be uncovered by the arp-v2 changes, however, > I was informed another thread on net@ also raised a ppp issue > of similar erroneous behavior in 7.x. > > So if I remember correctly, the problem you've reported is > a different issue. I had to fix the kernel code. The problem is, many NAT-PMP utilizing programs (e.g. p2p-clients) according to protocol specs do lookup of default gateway's IP address. FreeBSD ppp implementations tend to include correct address of gateway, so lookup works, while some other ppp implementations specify something other, e.g. inetrface route, self address... Will this change break those progs on FreeBSD too? -- WBR, Vadim Goncharov. ICQ#166852181 mailto:vadim_nuclight@mail.ru [Moderator of RU.ANTI-ECOLOGY][FreeBSD][http://antigreen.org][LJ:/nuclight]