Re: dhcpd uses bad current time

2013-05-16 Thread Otto Moerbeek
On Wed, May 15, 2013 at 10:29:22AM +0200, Gerhard Roth wrote: On Wed, 15 May 2013 10:15:54 +0200 Gerhard Roth gr...@genua.de wrote: In dhcpd, variable cur_time is set only once per dispatch loop. Unfortunately, this is done before the poll(2) call. Since poll(2) may sleep for an

dhcpd uses bad current time

2013-05-15 Thread Gerhard Roth
In dhcpd, variable cur_time is set only once per dispatch loop. Unfortunately, this is done before the poll(2) call. Since poll(2) may sleep for an arbitrary amount of time, the value of cur_time might refer to some long ago point in time. When message dispatching is done, timeouts and lease ends

Re: dhcpd uses bad current time

2013-05-15 Thread Otto Moerbeek
On Wed, May 15, 2013 at 10:15:54AM +0200, Gerhard Roth wrote: In dhcpd, variable cur_time is set only once per dispatch loop. Unfortunately, this is done before the poll(2) call. Since poll(2) may sleep for an arbitrary amount of time, the value of cur_time might refer to some long ago point

Re: dhcpd uses bad current time

2013-05-15 Thread Gerhard Roth
On Wed, 15 May 2013 10:15:54 +0200 Gerhard Roth gr...@genua.de wrote: In dhcpd, variable cur_time is set only once per dispatch loop. Unfortunately, this is done before the poll(2) call. Since poll(2) may sleep for an arbitrary amount of time, the value of cur_time might refer to some long

Re: dhcpd uses bad current time

2013-05-15 Thread Gerhard Roth
On Wed, 15 May 2013 10:24:22 +0200 Otto Moerbeek o...@drijf.net wrote: On Wed, May 15, 2013 at 10:15:54AM +0200, Gerhard Roth wrote: In dhcpd, variable cur_time is set only once per dispatch loop. Unfortunately, this is done before the poll(2) call. Since poll(2) may sleep for an