check_dhcp -s <hostaddress> doesn't work if dhcp-server answers with different next-server ip

Bug #1119145 reported by abma on 2013-02-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Nagios Plugins
nagios-plugins (Ubuntu)

Bug Description

specific windows dhcp-servers can't be checked, only if a dhcp-server exists in a subnet. thats bad because faulty dhcp-servers will be detected as fine.

[Test Case]
setup a windows 2008 r2 dhcp server with the option boot-server set to an ip != dhcp-server and run check_dhcp -s <server ip> against it. it will receive a response but detect it as invalid because it uses the ip from set for the boot server (next-server).

[Regression Potential]
low, as only check_dhcp could be broken by the patch.

abma (abma) wrote :

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise

abma (abma) wrote :

dhcp-server is m$ windows server 2008 r2, so nothing special...

Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

It looks like this was fixed in;a=commit;h=f091d59e0f9abec9304d9d230fafc2dec001baba and;a=commit;h=4d5276273287ef59881b541ba96279e91974a4b2, and these changes are in 1.4.16-1ubuntu3 in Raring, so I'm marking this bug as Fix Released.

If you need a fix for an existing stable release, please comment with a justification against and complete steps 1, 2 and 3 in

Changed in nagios-plugins (Ubuntu):
status: New → Fix Released
abma (abma) wrote :

Imo its this category:
"Bugs which do not fit under above categories, but (1) have an obviously safe patch and (2) affect an application rather than critical infrastructure packages (like or the kernel). " (thanks for pointing to the patch)

description: updated
Robie Basak (racb) wrote :

I've uploaded a test fix to my experimental PPA ( Since I can't verify the fix myself, please can you test the package available from here before I request an archive upload? Once this is checked, I will request the fix be uploaded officially. The final proposed package will then need to be verified again before it can enter precise-updates.

abma (abma) wrote :

i've tried

./check_dhcp -s
OK: 1 DHCPOFFER(s) erhalten, 1 of 1 requested servers responded, maximale Lease-Dauer = 691200 sec.
./check_dhcp -s
CRITICAL: 1 DHCPOFFER(s) erhalten, 0 of 1 requested servers responded, maximale Lease-Dauer = 691200 sec.
OK: 1 DHCPOFFER(s) erhalten, maximale Lease-Dauer = 691200 sec.

( is the dhcp server, so it has to fail in the second run)
works like a charm, thanks! :)

Robie Basak (racb) wrote :

Debdiff for precise-proposed attached.

Robie Basak (racb) wrote :
Jamie Strandboge (jdstrand) wrote :

Patch looks good, builds fine and introduces no new compiler warnings/errors. ACK. I've uploaded it, but a member of ubuntu-sru will need to process is based on

Unsubscribing ubuntu-sponsors and subscribing ubuntu-sru.

Changed in nagios-plugins (Ubuntu Precise):
status: New → Confirmed

Hello abma, or anyone else affected,

Accepted nagios-plugins into precise-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at . Thank you in advance!

Changed in nagios-plugins (Ubuntu Precise):
status: Confirmed → Fix Committed
tags: added: verification-needed

The fix for this bug has been awaiting testing feedback in the -proposed repository for precise for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
abma (abma) wrote :

aw, oops, sorry, will test on monday. imo it made no sense that the same person tests this again.

abma (abma) wrote :

tested it & works for me!

tags: added: verification-done
removed: removal-candidate verification-needed
abma (abma) wrote :

maybe as note: i've tested with the same config that failed with the original package...

also, this still works, too:

/usr/lib/nagios/plugins/check_dhcp -s
OK: 1 DHCPOFFER(s) erhalten, 1 of 1 requested servers responded, maximale Lease-Dauer = 691200 sec

error case works, too:

/usr/lib/nagios/plugins/check_dhcp -s
CRITICAL: 1 DHCPOFFER(s) erhalten, 0 of 1 requested servers responded, maximale Lease-Dauer = 691200 sec.

(critical is fine, as the dhcp-server is

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nagios-plugins - 1.4.15-5ubuntu3.1

nagios-plugins (1.4.15-5ubuntu3.1) precise-proposed; urgency=low

  * d/patches/17_check_dhcp_address.dpatch: fix check_dhcp conflation of
    source IP and next-server (LP: #1119145).
 -- Robie Basak <email address hidden> Fri, 08 Feb 2013 17:39:44 +0000

Changed in nagios-plugins (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.