From owner-freebsd-net@FreeBSD.ORG Fri Jul 13 12:44:21 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 1B094106564A; Fri, 13 Jul 2012 12:44:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id E43518FC0C; Fri, 13 Jul 2012 12:44:20 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4ED68B94A; Fri, 13 Jul 2012 08:44:20 -0400 (EDT) From: John Baldwin To: freebsd-net@freebsd.org Date: Fri, 13 Jul 2012 08:41:23 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <4FFF3683.7020107@rawbw.com> <20120713094830.GA83006@server.rulingia.com> In-Reply-To: <20120713094830.GA83006@server.rulingia.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201207130841.23528.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 13 Jul 2012 08:44:20 -0400 (EDT) Cc: Yuri , Brooks Davis , 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: Fri, 13 Jul 2012 12:44:21 -0000 [ Adding Brooks, IIRC, he imported the current dhclient ] On Friday, July 13, 2012 5:48:30 am Peter Jeremy wrote: > On 2012-Jul-12 13:41:39 -0700, Yuri wrote: > >I have the simplest possible DHCP setup: ifconfig_re0="DHCP" in > >/etc/rc.conf. > > > >When the system boots, it gets connected fine. > > > >Now, I disconnect my laptop and connect it to another network. > >When cable is disconnected, IP address of this interface stays the same, > >old one is not removed. > >When I plug it into another network, the same IP address stays. New IP > >doesn't get set. This is bad. > >So I have to manually do 'ifconfig re0 down && remove && > >ifconfig re0 up'. > > This is a bug in dhclient - see PR bin/166656, which includes a fix. I think this is the correct answer. Brooks, can you look at the PR and patch? If you are busy I can commit it if you give the ok. -- John Baldwin