[En-Nut-Discussion] DHCP Issues

Harald Kipp harald.kipp at egnite.de
Tue Feb 17 16:34:46 CET 2015

Hi Coleman,

On 16.02.2015 18:25, Coleman Brumley wrote:

> (NutDhcpClient) isn't automatically issuing a renew based on the renewal
> period issued by my DHCP server.

I'm unable to reproduce the problem. Here is what I did:

Change "#if 0" to "#if 1" to enable local debugging.

  #if 1
  /* Use for local debugging. */

Override renewal time (I do not want to change our office DHCP):

  cfgp->dyn_renewalTime = ntohl(lval);
  cfgp->dyn_renewalTime = 60;

Each minute I get the following on stdout:

[1.DHCP-RENEWING 60][DHCP-Send to][DHCP-Recv from][DHCP-Opt-53][DHCP-Opt

So, renewal takes place as expected.

> On another note, the DHCP ParseReply seems to be crashing when it receives
> options that it doesn't know how to parse (options 249, and 252 for
> example). This is occurring when Microsoft machines are broadcasting DHCP
> INFORM requests. 

Quite unlikely, because almost any DHCP server will send options not
known to our DHCP client.


  /* Total lease time granted. */
  else if (*op == DHCPOPT_LEASETIME) {
    cfgp->dyn_leaseTime = ntohl(lval);

I appended

  else {
    printf("Unknown %u(%u)\n", *op, ol);

which results in

  Unknown 38(4)

without crashing.

Not exactly your environment, but I can hardly imagine that this won't
work elsewhere. What I assume is, that you are running out of stack
space. Among other things, this depends on compiler versions.

See the software manual


on page 46ff as well as


Please let us know, if this solved your problem.



More information about the En-Nut-Discussion mailing list