From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 22:14:40 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9F8F106564A; Mon, 18 Apr 2011 22:14:40 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 450338FC08; Mon, 18 Apr 2011 22:14:40 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id p3IMEdRB036142; Tue, 19 Apr 2011 02:14:39 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id p3IMEdnm036141; Tue, 19 Apr 2011 02:14:39 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 19 Apr 2011 02:14:38 +0400 From: Gleb Smirnoff To: Maxim Sobolev Message-ID: <20110418221438.GB34767@FreeBSD.org> References: <201104170605.p3H65cab028890@svn.freebsd.org> <20110418181314.GL16958@FreeBSD.org> <4DACB0C3.6000804@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4DACB0C3.6000804@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r220736 - head/sbin/natd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 22:14:40 -0000 On Mon, Apr 18, 2011 at 02:44:35PM -0700, Maxim Sobolev wrote: M> On 4/18/2011 11:13 AM, Gleb Smirnoff wrote: M> > This looks like a hack and better place for this hack would be shell M> > scripts rather than nat daemon. M> M> Well, I am not sure how would you apply shell script in such case. The M> problem with the original code is that natd just silently exits, leaving M> machine without a network connection. For some reason this problem M> started after upgrade from 7.4 to 8.2, perhaps there is some changes in M> the dhclient which allows it to run is parallel with other start-up M> activity. M> M> And I don't see any problem with natd waiting indefinitely on the M> interface to acquire IP address, it's no better and no worse than the M> current behavior when the natd simply bails out. Hack can be applied to /etc/rc.d/natd, and better do it locally, not in FreeBSD svn. Example for such hack that is waiting for network in rc.d script can be found here: http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/quagga/files/quagga.sh.in?rev=1.18 See how $quagga_wait_for works. -- Totus tuus, Glebius.