Patch for dhcpctl/dhcpctl.c and omapip/generic.c

michael kapelko kornerr at
Thu Jul 28 01:37:46 UTC 2011

I checked the latest 4.2.1-P1 sources and the second patch still
applies, it doesn't originate from 3.0.

2011/7/27, sscdvp at <sscdvp at>:
> The first part (1) of your patch omits the fix for second zero-time
> omapi_wait_for_completion() call in dhcpctl_wait_for_completion(). Probably
> more reasonable waiting time values should be provided (one as connecting
> timeout, one as connection timeout) as arguments to dhcpctl_connect() and
> dhcpctl_wait_for_completion() calls or by introducing a new dhcpctl call?
> Just not to use additional header sys/time.h, instead of gettimeofday()
> call, it could be replaced with ISC DHCP's GET_TIME() macro provided via
> osdep.h (included via omapip/omapip_p.h)?
> The second part (2) of your patch seems to be origined from DHCP 3.0 sources
> which already have that correction. Anyhow it should be considered a trivial
> patch which can be included in the next upcoming release of DHCP 4.x
> versions.
> 2011/7/26 michael kapelko <kornerr at>
>> Hi.
>> I've implemented a C++ app that drops DHCP leases when link down trap
>> comes. I had to patch dhcp4 sources with the attached file to solve 2
>> issues:
>> 1. long connection timeout. dhcpctl.c is patched to have timeout = 1s.
>> 2. looping thru objects in generic.c some of which might be NULL.
>> patched to check for NULL.
>> The only issue can be with timeout setting. I haven't come up with a
>> convenient way to pass it, so just hard-coded it.
>> I would like this (or similar functionality) patch to be in trunk.
>> Thanks.
>> _______________________________________________
>> dhcp-users mailing list
>> dhcp-users at

More information about the dhcp-users mailing list