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)?<br>
<br>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.<br>
<br><div class="gmail_quote">2011/7/26 michael kapelko <span dir="ltr"><<a href="mailto:kornerr@gmail.com">kornerr@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi.<br>
I've implemented a C++ app that drops DHCP leases when link down trap<br>
comes. I had to patch dhcp4 sources with the attached file to solve 2<br>
issues:<br>
1. long connection timeout. dhcpctl.c is patched to have timeout = 1s.<br>
2. looping thru objects in generic.c some of which might be NULL.<br>
patched to check for NULL.<br>
The only issue can be with timeout setting. I haven't come up with a<br>
convenient way to pass it, so just hard-coded it.<br>
I would like this (or similar functionality) patch to be in trunk.<br>
Thanks.<br>
<br>_______________________________________________<br>
dhcp-users mailing list<br>
<a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br></blockquote></div><br>