dhclient fails to send DHCPRELEASE

Ragnar Lönn ragnar at ghn.se
Wed Aug 16 08:57:21 UTC 2006


Hi all,

We have discovered a strange behaviour with dhclient 3.0.3 and 3.0.4. 
We're trying to send a DHCPRELEASE using the -r switch, but no 
DHCPRELEASE packet is sent out, even though dhclient reports doing so.

When we issue the dhclient -r command, we see an ARP who-has request 
with the client machine asking for the MAC address of the DHCP server 
and then we see the DHCP server responding, then nothing more after 
that. When we check the ARP table, the client has no entry for the DHCP 
server

We thought it might be a race condition, or something similar, with 
dhclient executing dhclient-script premateurely, causing the interface 
to be taken down, which destroys the ARP table and causes the following 
DHCPRELEASE packet to fail to be sent. To test this we disabled the code 
in dhclient-script that handles DHCPRELEASE . After line 164 of 
dhclient-script we inserted a line that just exited the script, instead 
of doing what it normally does upon DHCP release:

if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = 
xRELEASE ] \
   || [ x$reason = xSTOP ]; then
  exit_with_hooks 0    <----- exit immediately

And this made the DHCPRELEASE packet get transmitted, so we might have 
been right. I haven't investigated further than this, but thought I'd 
ask the list if this is a known bug or what the problem is?

The system is a FreeBSD 4.11-release, and the interface is a vlan(4) 
interface, with an Intel em(4) interface as parent. The parent interface 
is in promiscuous mode, with autosrc disabled, as the vlan interface has 
its own MAC address. The packets we can see on both the child and parent 
interfaces seem to have the right source and destination addresses (when 
they get sent).

Regards,

  /Ragnar











More information about the dhcp-users mailing list