[pkg-dhcp-devel] [apollock at debian.org: Old DHCP patch to exit 2 if binding fails]

Andrew Pollock apollock at debian.org
Mon Jul 13 15:36:58 UTC 2009


On Mon, Jul 13, 2009 at 10:51:36AM +0100, Matt Zimmerman wrote:
> 
> The story behind this patch is that I made a mistake which resulted in
> dhclient-script exiting with status 1 (I don't recall exactly how; I think
> it was a typo in one of the hooks).  dhcpd interpreted this to mean that the
> lease was found to be unusable, and issued DHCPDECLINE to the server.
> 
> The server immediately issued me a new lease, which triggered the same
> error, and another DHCPDECLINE, ad infinitum.
> 
> ...well, not quite infinitum, but it *very* quickly exhausted all available
> DHCP leases, causing a local outage which I had to call my ISP and explain.
> 
> The idea of the patch was to use a distinct exit code for "this lease is no
> good" which wouldn't be confused with "there was an error executing one of
> the hooks".  In retrospect, 2 is probably not an ideal choice, as I think
> the shell will generate that as an error exit code in some cases.
> 
> Does that help clarify things?
> 

Oh yes, greatly, thanks very much. The next thing I need to do is make sure
that dhclient-script is doing the right thing at the right places, I don't
think it currently is. I will discuss this patch with upstream.

regards

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-dhcp-devel/attachments/20090714/d6f7e893/attachment.pgp>


More information about the pkg-dhcp-devel mailing list