From owner-freebsd-net@FreeBSD.ORG Sat Jul 14 07:51:36 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2807E1065741 for ; Sat, 14 Jul 2012 07:51:33 +0000 (UTC) (envelope-from jhellenthal@dataix.net) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id DE6598FC08 for ; Sat, 14 Jul 2012 07:51:32 +0000 (UTC) Received: by yhfs35 with SMTP id s35so5074741yhf.13 for ; Sat, 14 Jul 2012 00:51:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dataix.net; s=rsa; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; bh=12hSALWjFP1E7DYHhVbuh/BDGLPh3fUUXBqCil81vbw=; b=GzN5RTVOsJVhnDxYrO76jNZNG7USiesZr78CJ08wigSNjkdbjYoxryMiMnum/OnboX 5Bd2rQGEzIayKAYC16AfARvnII7qiUSbco/sJcJhZW2M4Lr5aGufij2DcxUSVGi0B7A1 g1kHxUTn2ohY6bNDYtpAtoV5rLnZeLcZwOuUc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:x-gm-message-state; bh=12hSALWjFP1E7DYHhVbuh/BDGLPh3fUUXBqCil81vbw=; b=VDyfrS78/H4M0E9B9bYA4vbP9KvyVIPcTI5Lhe3rq0044UZR8jxQdMCwjNrTHuH0gw CqPrOJGU3/jEFnx9nrFSeXUOuT2RUe5UUFuU38PbslcMjZHq3/3JSYM6aJtzxjr87pb3 NMyymfrUNsHfgN5Rmpn3xSOJXQIV7mxnEaEdF3onoLilgWcnD1JrpjXyfZo3GI1sPSvH 5gYcVLXYkOCvj3UsSS3klS1mYftgFMRMPy4ne5/8spDAvDd+g3XcuvYDa4bu73jg+o2N oa56bqr3uqY/qY7EkGXPXXk/a9vefhwql3jH9Vgsw3yV5Y0I3aGtZ1M0d7wTfKYktNOI bW/Q== Received: by 10.42.146.6 with SMTP id h6mr2407538icv.53.1342252291907; Sat, 14 Jul 2012 00:51:31 -0700 (PDT) Received: from DataIX.net ([99.109.124.107]) by mx.google.com with ESMTPS id z7sm3461633igb.3.2012.07.14.00.51.30 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 14 Jul 2012 00:51:31 -0700 (PDT) Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.5/8.14.5) with ESMTP id q6E7pSig000992 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 14 Jul 2012 03:51:28 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Received: (from jh@localhost) by DataIX.net (8.14.5/8.14.5/Submit) id q6E7pQXi000991; Sat, 14 Jul 2012 03:51:26 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Date: Sat, 14 Jul 2012 03:51:25 -0400 From: Jason Hellenthal To: Yuri Message-ID: <20120714075125.GA566@DataIX.net> References: <4FFF3683.7020107@rawbw.com> <20120713094830.GA83006@server.rulingia.com> <500066F4.2030102@rawbw.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <500066F4.2030102@rawbw.com> X-Gm-Message-State: ALoCoQl+YlQill4nI3RmBetbz9vi9wjeAcOWOripeV1ygegmEUbIneTh6nxr4ZNUQsxF9cPU2FK5 Cc: freebsd-net@freebsd.org, Peter Jeremy Subject: Re: System doesn't detect unplugged network cable and doesn't set interface up properly with DHCP X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 07:51:36 -0000 On Fri, Jul 13, 2012 at 11:20:36AM -0700, Yuri wrote: > On 07/13/2012 02:48, Peter Jeremy wrote: > > This is a bug in dhclient - see PR bin/166656, which includes a fix. > > I think this PR addresses part of the problem: dhclient doesn't exit when the link goes down. To the best of my knowledge this is the correct way to handle this. Why not reuse whats already been set if the link was to be brought back up ? ofcourse it should obviously change to the correct IP if another was negotiated but that is rarely the case. > But even if it exits, it leaves the IP address that it has set, which is wrong. This IP address survives through the next DHCP setup process and ends up being the second IP address. > Should be very easy to on exit remove any IP address that was set during dhclient process lifetime. I couldnt agree more. Interface tear down is definately needed here. -- - (2^(N-1))