From owner-freebsd-net@FreeBSD.ORG Fri Aug 17 22:59:11 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C55CF106566B; Fri, 17 Aug 2012 22:59:11 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by mx1.freebsd.org (Postfix) with ESMTP id 3AA818FC14; Fri, 17 Aug 2012 22:59:10 +0000 (UTC) Received: from server.rulingia.com (c220-239-249-137.belrs5.nsw.optusnet.com.au [220.239.249.137]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q7HMx7L3031590 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 18 Aug 2012 08:59:07 +1000 (EST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.5/8.14.5) with ESMTP id q7HMwx3l018325 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 18 Aug 2012 08:58:59 +1000 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q7HMwwvx018324; Sat, 18 Aug 2012 08:58:58 +1000 (EST) (envelope-from peter) Date: Sat, 18 Aug 2012 08:58:58 +1000 From: Peter Jeremy To: John Baldwin Message-ID: <20120817225857.GA2377@server.rulingia.com> References: <4FFF3683.7020107@rawbw.com> <500066F4.2030102@rawbw.com> <20120815003151.GF33399@server.rulingia.com> <201208171148.17427.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vkogqOf2sHV7VnPd" Content-Disposition: inline In-Reply-To: <201208171148.17427.jhb@freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-net@freebsd.org, Yuri 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: Fri, 17 Aug 2012 22:59:11 -0000 --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Aug-17 11:48:17 -0400, John Baldwin wrote: >Hmm, I think I see the issue. It doesn't export the existing lease info to >the script when running the FAIL action. I just tested this change and it >removed the old IP on my laptop when I tested it just now. I did some investigating during the week and came to pretty much the same patch. But the existing "don't remove an existing address" behaviour looked like a design decision and I went digging to find exactly what ip->client->active represented - and, in particular, whether in could represent an address that dhclient hadn't added to the interface. I did find that it could be read from the leases file but didn't have time to fully work through the code. If you're happy that this patch can't incorrectly remove a pre-existing IP address (I'm now reasonably confident that it can't), then I'm happy that it otherwise works. --=20 Peter Jeremy --vkogqOf2sHV7VnPd Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlAuzLEACgkQ/opHv/APuIcVCwCdHHXkED/9grC9nVGSLd5Wegna 58gAnAgRA3vCw2EE+LNi0V8rViel3fvv =zytO -----END PGP SIGNATURE----- --vkogqOf2sHV7VnPd--