System doesn't detect unplugged network cable and doesn't set interface up properly with DHCP

Peter Jeremy peter at rulingia.com
Fri Aug 17 22:59:11 UTC 2012


On 2012-Aug-17 11:48:17 -0400, John Baldwin <jhb at freebsd.org> 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.

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20120817/64a39495/attachment.pgp


More information about the freebsd-net mailing list