Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2012 09:55:07 -0600
From:      Ian Lepore <freebsd@damnhippie.dyndns.org>
To:        lev@freebsd.org
Cc:        Garrett Cooper <yanegomi@gmail.com>, freebsd-current@freebsd.org, Peter Jeremy <peterjeremy@acm.org>
Subject:   Re: r239356: does it mean, that synchronous dhcp and dhcplcinet with disabled devd gone?
Message-ID:  <1345564507.27688.354.camel@revolution.hippie.lan>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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





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