Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jul 2012 09:43:00 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-net@freebsd.org
Cc:        Peter Jeremy <peter@rulingia.com>, Yuri <yuri@rawbw.com>
Subject:   Re: System doesn't detect unplugged network cable and doesn't set interface up properly with DHCP
Message-ID:  <201207310943.00547.jhb@freebsd.org>
In-Reply-To: <20120714075125.GA566@DataIX.net>
References:  <4FFF3683.7020107@rawbw.com> <500066F4.2030102@rawbw.com> <20120714075125.GA566@DataIX.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, July 14, 2012 3:51:25 am Jason Hellenthal wrote:
> 
> 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.

The new dhclient will try to use an existing lease when it negotiates, so
I think that it should DTRT.

> > 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.

Hmmm, this does seem true.  Do you either of you have any patches for this,
or Peter, can you extend your patch to do this?

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207310943.00547.jhb>