Re: r239356: does it mean, that synchronous dhcp and dhcplcinet with disabled devd gone?

From: Ian Lepore <freebsd_at_damnhippie.dyndns.org>
Date: Tue, 21 Aug 2012 09:55:07 -0600
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
Received on Tue Aug 21 2012 - 13:55:16 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:29 UTC