From owner-freebsd-current@FreeBSD.ORG Tue Aug 21 15:55:16 2012 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 A9C821065675 for ; Tue, 21 Aug 2012 15:55:16 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta12.emeryville.ca.mail.comcast.net (qmta12.emeryville.ca.mail.comcast.net [76.96.27.227]) by mx1.freebsd.org (Postfix) with ESMTP id 84A548FC19 for ; Tue, 21 Aug 2012 15:55:16 +0000 (UTC) Received: from omta06.emeryville.ca.mail.comcast.net ([76.96.30.51]) by qmta12.emeryville.ca.mail.comcast.net with comcast id pQDs1j00716AWCUACTvAV7; Tue, 21 Aug 2012 15:55:10 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta06.emeryville.ca.mail.comcast.net with comcast id pTv81j00Y4NgCEG8STv9zb; Tue, 21 Aug 2012 15:55:10 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q7LFt752022467; Tue, 21 Aug 2012 09:55:07 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: lev@freebsd.org In-Reply-To: <709115163.20120821192652@serebryakov.spb.ru> References: <20120821095527.GA33206@hell.ukr.net> <67977762.20120821154035@serebryakov.spb.ru> <1959717636.20120821155308@serebryakov.spb.ru> <201208210934.31484.jhb@freebsd.org> <1049151425.20120821190433@serebryakov.spb.ru> <1345562163.27688.347.camel@revolution.hippie.lan> <709115163.20120821192652@serebryakov.spb.ru> Content-Type: text/plain; charset="koi8-r" Date: Tue, 21 Aug 2012 09:55:07 -0600 Message-ID: <1345564507.27688.354.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit Cc: Garrett Cooper , freebsd-current@freebsd.org, Peter Jeremy Subject: Re: r239356: does it mean, that synchronous dhcp and dhcplcinet with disabled devd gone? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 15:55:16 -0000 On Tue, 2012-08-21 at 19:26 +0400, Lev Serebryakov wrote: > Hello, Ian. > You wrote 21 августа 2012 г., 19:16:03: > > IL> It has worked this way for me for years. Does it somehow not work this > IL> way for everyone? > Please, read comment to r239356. Starting from this revision > dhclient exists on interface down and _remiove_ IP address from > interface. Removal of address from interface will drop all open > connections, which uses this address. > Aha! That's where the confusion is happening -- I didn't read the comment, I read the code. I don't know what "teardown the configured lease" in that comment means, but it doesn't mean that the interface loses its current configuration, or that any existing connections are perturbed. If the cable is plugged back into the same network, the interface will get the same address it last had and existing connections continue to work, unless the dhcp server recycled that lease to another client while the cable was unplugged (highly unlikely unless the server/network is starved for addresses, since the dhcpd design is to avoid recycling recently-used addresses). The important point is that if you unplug the cable then plug it into a different network, now the right thing will happen -- you will acquire an address on the new network. That's the reason that this change is an important bugfix for a long standing (many many years) bug in freebsd's dhclient. -- Ian