dhclient - Remove cur_time global.
authorAntonio Huete Jimenez <tuxillo@quantumachine.net>
Fri, 1 Aug 2014 18:19:04 +0000 (20:19 +0200)
committerAntonio Huete Jimenez <tuxillo@quantumachine.net>
Sat, 9 Aug 2014 16:29:12 +0000 (18:29 +0200)
commit3c279f6e4ed072b70dbe273d2748999f478ae6bd
tree559a275777348ca28af6a3ec7256582d0783bc9c
parent04e4af026e4eda810ab1bdfeb37cba72b3c713e4
dhclient - Remove cur_time global.

- Junk global cur_time, and use time(NULL) or local variables where
  time is checked multiple times. Add a set_timeout_interval() function
  to allow setting a timeout based on an interval from current time.

- Fixes issues with initial startup where the global cur_time was
  always old and caused initial DHCPDISCOVER or DHCPREQUEST packets
  to be sent multiple times. And probably other timeout related
  oddities.

Taken-from: OpenBSD
sbin/dhclient/clparse.c
sbin/dhclient/dhclient.c
sbin/dhclient/dhcpd.h
sbin/dhclient/dispatch.c