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

Bug #1119145 reported by abma
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Nagios Plugins
Unknown
Unknown
nagios-plugins (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
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.

Revision history for this message
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

Revision history for this message
abma (abma) wrote :

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

Revision history for this message
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 http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=f091d59e0f9abec9304d9d230fafc2dec001baba and http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;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 https://wiki.ubuntu.com/StableReleaseUpdates#When and complete steps 1, 2 and 3 in https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

Changed in nagios-plugins (Ubuntu):
status: New → Fix Released
Revision history for this message
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 X.org or the kernel). " (thanks for pointing to the patch)

description: updated
Revision history for this message
Robie Basak (racb) wrote :

I've uploaded a test fix to my experimental PPA (https://launchpad.net/~racb/+archive/experimental). 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.

Revision history for this message
abma (abma) wrote :

i've tried

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

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

Revision history for this message
Robie Basak (racb) wrote :

Debdiff for precise-proposed attached.

Revision history for this message
Robie Basak (racb) wrote :
Revision history for this message
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 https://wiki.ubuntu.com/StableReleaseUpdates.

Unsubscribing ubuntu-sponsors and subscribing ubuntu-sru.

Changed in nagios-plugins (Ubuntu Precise):
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote : Please test proposed package

Hello abma, or anyone else affected,

Accepted nagios-plugins into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/nagios-plugins/1.4.15-5ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed 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 https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in nagios-plugins (Ubuntu Precise):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote : [nagios-plugins/precise] verification still 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
Revision history for this message
abma (abma) wrote :

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

Revision history for this message
abma (abma) wrote :

tested it & works for me!

tags: added: verification-done
removed: removal-candidate verification-needed
Revision history for this message
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 192.168.101.249
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 192.168.101.250
CRITICAL: 1 DHCPOFFER(s) erhalten, 0 of 1 requested servers responded, maximale Lease-Dauer = 691200 sec.

(critical is fine, as the dhcp-server is 192.168.101.249)

Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

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.

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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