From noreply at sourceforge.net Thu Apr 5 17:46:02 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 05 Apr 2012 08:46:02 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-3515233 ] HTTP Check fails Message-ID: Patches item #3515233, was opened at 2012-04-05 08:46 Message generated for change (Tracker Item Submitted) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3515233&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bugfix Group: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Sailesh () Assigned to: Nobody/Anonymous (nobody) Summary: HTTP Check fails Initial Comment: check_http plugin version 1.4.15 fails at times while a search and string match case as below: intrestingly, it fails only at times and works most of the time. could not identify what environment make it break. the earlier version tested (1.4.12 and 1.4.13) works fine when 1.4.15 fails. see the examples below: # ../../libexec/check_http --version check_http v1.4.15 (nagios-plugins 1.4.15) example: # ../../libexec/check_http -H servername -u "/search-results?searchText=obama&search-header-search-submit=" -s "Displaying results" -t 60 HTTP CRITICAL: HTTP/1.1 200 OK - string 'Displaying results' not found on 'http://web6.aetv.com:80/search-results?searchText=obama&search-header-search-submit=' - 89652 bytes in 1.117 second response time |time=1.116784s;;;0.000000 size=89652B;;;0 This works fine with older version. see below: # ../../libexec/check_http_v13 --version check_http v2053 (nagios-plugins 1.4.13) # ../../libexec/check_http_v13 -H server -u "/search-results?searchText=obama&search-header-search-submit=" -s "Displaying results" -t 60 HTTP OK HTTP/1.1 200 OK - 0.387 second response time |time=0.386511s;;;0.000000 size=89531B;;;0 Tested on : Redhat / Centos version 5.x Tested Architecture: x86_64 Thanks ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3515233&group_id=29880 From noreply at sourceforge.net Fri Apr 6 16:50:48 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Fri, 06 Apr 2012 07:50:48 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-3515506 ] Add authoritative verification to check_dig Message-ID: Patches item #3515506, was opened at 2012-04-06 07:50 Message generated for change (Tracker Item Submitted) made by bruce_p You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3515506&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Enhancement Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Bruce Pennypacker (bruce_p) Assigned to: Nobody/Anonymous (nobody) Summary: Add authoritative verification to check_dig Initial Comment: This patch adds the -e option to check_dig, which checks that the 'aa' flag is returned in the 'flags' stanza from dig. This verifies that the responding name server is an authority for the for the domain being queried. Patch against Plugin Version (-V output): check_dig v1.4.15 (nagios-plugins 1.4.15) Plugin Name: check_dig Example Plugin Commandline: Tested on operating system: linux (RedHat 5.7) Tested on architecture: x86, x86_64 Tested with compiler: gcc 4.1.2 Examples (demonstrates that ns-1.sourceforge.com is authoritative for sf.net): [brucep at carbon:~/tmp] ./check_dig -H NS-1.SOURCEFORGE.COM -l sf.net -w 10 -c 20 -e DNS OK - 0.012 seconds response time (sf.net. 3600 IN A 216.34.181.62)|time=0.012328s;10.000000;20.000000;0.000000 [brucep at carbon:~/tmp] echo $? 0 [brucep at carbon:~/tmp] ./check_dig -H 4.2.2.2 -l sf.net -w 10 -c 20 -e DNS CRITICAL - 0.033 seconds response time (Non-authoritative answer when authoritative answer required.)|time=0.032638s;10.000000;20.000000;0.000000 [brucep at carbon:~/tmp] echo $? 2 [brucep at carbon:~/tmp] ./check_dig -H 4.2.2.2 -l sf.net -w 10 -c 20 DNS OK - 0.010 seconds response time (sf.net. 3576 IN A 216.34.181.62)|time=0.010212s;10.000000;20.000000;0.000000 [brucep at carbon:~/tmp] echo $? 0 Note: Last test does not use -e to ensure an otherwise valid response from dig. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3515506&group_id=29880 From noreply at sourceforge.net Mon Apr 9 17:00:41 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 09 Apr 2012 08:00:41 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3503921 ] check_dhcp.c incorrectly setting source ip address as siaddr Message-ID: Bugs item #3503921, was opened at 2012-03-13 16:16 Message generated for change (Comment added) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: infotek at gmail.com () Assigned to: Nobody/Anonymous (nobody) Summary: check_dhcp.c incorrectly setting source ip address as siaddr Initial Comment: nagios-plugins-1.4.15 plugins-root/check_dhcp.c Sets dhcp server source ip to the next server (siaddr) IP address, causing -s to fail to operate as expected. -s, --serverip=IPADDRESS IP address of DHCP server that we must hear from root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 275057756 (0x10650C5C) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.15 via 10.10.10.15 DHCPOFFER XID: 275057756 (0x10650C5C) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.15 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. 17:58:55.805403 IP (tos 0x0, ttl 128, id 20477, offset 0, flags [none], proto UDP (17), length 328) 10.10.10.15.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x10650c5c, Flags [none] (0x0000) Your-IP 10.10.10.166 Server-IP 10.10.10.24 Client-Ethernet-Address 00:22:19:56:99:48 file "kbox2000.0" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Subnet-Mask Option 1, length 4: 255.255.255.0 RN Option 58, length 4: 14400 RB Option 59, length 4: 25200 Lease-Time Option 51, length 4: 28800 Server-ID Option 54, length 4: 10.10.10.15 0x0000: 4500 0148 4ffd 0000 8011 d58f 0a0a 0a0f 0x0010: ffff ffff 0043 0044 0134 2e43 0201 0600 0x0020: 1065 0c5c 0000 0000 0000 0000 0a0a 0aa6 0x0030: 0a0a 0a18 0000 0000 0022 1956 9948 0000 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 0x0080: 0000 0000 0000 0000 6b62 6f78 3230 3030 0x0090: 2e30 0000 0000 0000 0000 0000 0000 0000 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 0x0100: 0000 0000 0000 0000 6382 5363 3501 0201 0x0110: 04ff ffff 003a 0400 0038 403b 0400 0062 0x0120: 7033 0400 0070 8036 040a 0a0a 0fff 0000 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 0x0140: 0000 0000 0000 0000 plugins-root/check_dhcp.c FIX /* If siaddr is non-zero, set "source" to siaddr */ /* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } */ ---------------------------------------------------------------------- Comment By: Andy () Date: 2012-04-09 08:00 Message: I get the "wrong" response without the above change also. DHCP is Windows Server 2008 R1 (actually SBS). We have a PXE Boot server and the check_dhcp thinks the PXE Boot is the actual server, which fails. ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-03-14 10:31 Message: What sort of DHCP server are you running? The plugin will only use "siaddr" in this way if the mandatory "server identifier" option is missing from the server's response. It seems the current code tried to fix some problem which showed up in certain environments with DHCP relays involved. However, in principle I agree that the plugin's interpretation of the "siaddr" field isn't correct. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:27 Message: diff --git a/a/plugins-root/check_dhcp.c b/b/plugins-root/check_dhcp.c index 2a1875c..b7f695b 100644 --- a/a/plugins-root/check_dhcp.c +++ b/b/plugins-root/check_dhcp.c @@ -588,10 +588,11 @@ int get_dhcp_offer(int sock){ memcpy(&via,&source,sizeof(source)) ; /* If siaddr is non-zero, set "source" to siaddr */ +/* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } - +*/ if(verbose){ printf(_("DHCPOFFER from IP address %s"),inet_ntoa(source.sin_addr)); printf(_(" via %s\n"),inet_ntoa(via.sin_addr)); ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:03 Message: I verified that I can check remote DHCP servers correctly after applying the fix. Options used were "check_dhcp -u -s 10.10.10.15". ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:47 Message: Example of -s being specified correctly in verbose mode. Fails because siaddr (10.10.10.24) is copied over source (10.10.10.15). root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v -s 10.10.10.15 Requested server address: 10.10.10.15 DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 513242689 (0x1E977641) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 513242689 (0x1E977641) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 CRITICAL: Received 1 DHCPOFFER(s), 0 of 1 requested servers responded, max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:33 Message: The ticket contains the output of check_dhcp after I fixed it (oops). Sorry :( Jason Ellison Below is the output from an unmodified version of check_dhcp : root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 1292513780 (0x4D0A31F4) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 1292513780 (0x4D0A31F4) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:22 Message: was trying to use google login... Jason Ellison infotek at gmail.com ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 From noreply at sourceforge.net Mon Apr 9 22:18:09 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 09 Apr 2012 13:18:09 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-2895334 ] Added -F configfile option to check_by_ssh Message-ID: Patches item #2895334, was opened at 2009-11-10 09:01 Message generated for change (Comment added) made by svennierlein You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=2895334&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Enhancement Group: None >Status: Closed >Resolution: Accepted Priority: 5 Private: No Submitted By: sni (svennierlein) Assigned to: Nobody/Anonymous (nobody) Summary: Added -F configfile option to check_by_ssh Initial Comment: This patch adds a new option to check_by_ssh. Example Commandline: ./check_by_ssh -F ~/.ssh/config -H localhost -C /bin/true Patch is against: %>./plugins/check_by_ssh -V check_by_ssh vtrunk.2272.dirty (nagios-plugins 1.4.14) The new -F option is directly passed through to ssh. From the ssh man page: -F configfile Specifies an alternative per-user configuration file. If a configuration file is given on the command line, the system-wide configuration file (/etc/ssh/ssh_config) will be ignored. The default for the per-user configuration file is ~/.ssh/config. With such a config file, you dont have to add multiple -o options to check_by_ssh. And you can maintain your ssh configuration from one place. I would be happy to see this patch applied. (2 new tests are included) ---------------------------------------------------------------------- Comment By: sni (svennierlein) Date: 2012-04-09 13:18 Message: This problem is now fixed in Git. Thank you for your report. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=2895334&group_id=29880 From holger at CIS.FU-Berlin.DE Tue Apr 10 12:29:25 2012 From: holger at CIS.FU-Berlin.DE (Holger =?iso-8859-1?Q?Wei=DF?=) Date: Tue, 10 Apr 2012 12:29:25 +0200 Subject: [Nagiosplug-devel] New release planned this month Message-ID: <20120410102925.GA4598416@CIS.FU-Berlin.DE> As there are quite a few fixes and enhancements in the current Git code, we'd like to cut the 1.4.16 release sometime this month. Let us know if there's anything that must go in before the release. If you have some spare time to test the code, you could use the current snapshot: http://nagiosplug.sourceforge.net/snapshot/nagios-plugins-master.tar.gz Please report any bugs you find, especially any regressions. Holger From holger at CIS.FU-Berlin.DE Tue Apr 10 14:42:05 2012 From: holger at CIS.FU-Berlin.DE (Holger =?iso-8859-1?Q?Wei=DF?=) Date: Tue, 10 Apr 2012 14:42:05 +0200 Subject: [Nagiosplug-devel] Move repositories to Github? Message-ID: <20120410124205.GD2496542@CIS.FU-Berlin.DE> I'd like to move our repositories over to Github, as I believe that would make things easier for both the community and those who review and apply contributions. Some people have already expressed a desire to submit patches via pull requests on Github. The only downside I see is that the list of team members would have to be maintained both at Github and at SourceForge. That's not a big deal. Currently, our SourceForge repositories are mirrored at: https://github.com/nagios-plugins I guess we could just turn things around and let SourceForge mirror the Github repositories. I'd leave everything else at SourceForge, at least for the moment. What do you think? Holger From ae at op5.se Tue Apr 10 14:49:24 2012 From: ae at op5.se (Andreas Ericsson) Date: Tue, 10 Apr 2012 14:49:24 +0200 Subject: [Nagiosplug-devel] Move repositories to Github? In-Reply-To: <20120410124205.GD2496542@CIS.FU-Berlin.DE> References: <20120410124205.GD2496542@CIS.FU-Berlin.DE> Message-ID: <4F842C54.9030905@op5.se> On 04/10/2012 02:42 PM, Holger Wei? wrote: > I'd like to move our repositories over to Github, as I believe that > would make things easier for both the community and those who review and > apply contributions. Some people have already expressed a desire to > submit patches via pull requests on Github. > pull requests can be emailed from anywhere though, so it's not exactly a strong argument. > The only downside I see is that the list of team members would have to > be maintained both at Github and at SourceForge. That's not a big deal. > Why? Just move to github completely and you needn't bother with sf at all, except maybe for new releases where you have to upload a tarball once in a blue moon. > Currently, our SourceForge repositories are mirrored at: > > https://github.com/nagios-plugins > > I guess we could just turn things around and let SourceForge mirror the > Github repositories. > > I'd leave everything else at SourceForge, at least for the moment. > > What do you think? > If most contributors think it's easier, go with it. I see no reason what so ever to make life harder than necessary for contributors, and if a github "fork+request pull" workflow is what they want; Just go with it. -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. From michael.friedrich at univie.ac.at Tue Apr 10 15:29:11 2012 From: michael.friedrich at univie.ac.at (Michael Friedrich) Date: Tue, 10 Apr 2012 15:29:11 +0200 Subject: [Nagiosplug-devel] Move repositories to Github? In-Reply-To: <20120410124205.GD2496542@CIS.FU-Berlin.DE> References: <20120410124205.GD2496542@CIS.FU-Berlin.DE> Message-ID: <4F8435A7.4030909@univie.ac.at> On 2012-04-10 14:42, Holger Wei? wrote: > I'd like to move our repositories over to Github, +1 -- DI (FH) Michael Friedrich Vienna University Computer Center Universitaetsstrasse 7 A-1010 Vienna, Austria email: michael.friedrich at univie.ac.at phone: +43 1 4277 14359 mobile: +43 664 60277 14359 fax: +43 1 4277 14338 web: http://www.univie.ac.at/zid http://www.aco.net Lead Icinga Core Developer http://www.icinga.org From holger at CIS.FU-Berlin.DE Tue Apr 10 21:59:43 2012 From: holger at CIS.FU-Berlin.DE (Holger =?iso-8859-1?Q?Wei=DF?=) Date: Tue, 10 Apr 2012 21:59:43 +0200 Subject: [Nagiosplug-devel] Move repositories to Github? In-Reply-To: <4F842C54.9030905@op5.se> References: <20120410124205.GD2496542@CIS.FU-Berlin.DE> <4F842C54.9030905@op5.se> Message-ID: <20120410195943.GE2496542@CIS.FU-Berlin.DE> * Andreas Ericsson [2012-04-10 14:49]: > On 04/10/2012 02:42 PM, Holger Wei? wrote: > > I'd like to move our repositories over to Github, as I believe that > > would make things easier for both the community and those who review and > > apply contributions. Some people have already expressed a desire to > > submit patches via pull requests on Github. > > pull requests can be emailed from anywhere though, so it's not exactly > a strong argument. Personally, I'd actually prefer receiving commits via email (as I'm not all that keen on clicking around in web interfaces), but from what I've seen elsewhere, Github just works better for most contributors. Yes, git-send-email(1) works fine for some communities such as the Git project itself, but I fear it might not work as well for our community. > > The only downside I see is that the list of team members would have to > > be maintained both at Github and at SourceForge. That's not a big deal. > > Why? Just move to github completely and you needn't bother with sf at all, > except maybe for new releases where you have to upload a tarball once in a > blue moon. I just don't want to invest the time to look into the conversion of tracker items and stuff like that right now. > If most contributors think it's easier, go with it. I see no reason > what so ever to make life harder than necessary for contributors, and > if a github "fork+request pull" workflow is what they want; Just go > with it. That's what I thought. Thanks for your feedback! Holger From mark.frost1 at pepsico.com Tue Apr 10 22:24:15 2012 From: mark.frost1 at pepsico.com (Frost, Mark {BIS}) Date: Tue, 10 Apr 2012 16:24:15 -0400 Subject: [Nagiosplug-devel] New release planned this month In-Reply-To: <20120410102925.GA4598416@CIS.FU-Berlin.DE> References: <20120410102925.GA4598416@CIS.FU-Berlin.DE> Message-ID: Hi, Holger, I had submit a patch quite some time ago for check_http.c to add HTTP CONNECT capability through a proxy that supported that same protocol. I believe I got some feedback from Ton about it, but then it kind of drizzled out and then Ton resigned. I think I even saw someone else submit a patch to do something similar some time ago as well. Since that time, I keep manually updating the latest plugins release with my patch since we need it here internally. I was hoping that either my patch or the other one I saw might be included in the next release, but I don't see anything that appears to do that in the snapshot you sent. The patch I had submitted was id 2975393. I never looked at id 3414894, but it looks like it does something similar. Is there anything I might be able to do that could help one of these move along to a release? I'm assuming it's too late for this one, but I'd like to know what it's nailed down for some future release. Thanks Mark -----Original Message----- From: Holger Wei? [mailto:holger at CIS.FU-Berlin.DE] Sent: Tuesday, April 10, 2012 6:29 AM To: Nagios Plugin Development Subject: [Nagiosplug-devel] New release planned this month As there are quite a few fixes and enhancements in the current Git code, we'd like to cut the 1.4.16 release sometime this month. Let us know if there's anything that must go in before the release. If you have some spare time to test the code, you could use the current snapshot: http://nagiosplug.sourceforge.net/snapshot/nagios-plugins-master.tar.gz Please report any bugs you find, especially any regressions. Holger ------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev _______________________________________________________ Nagios Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel ::: Please include plugins version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null From noreply at sourceforge.net Tue Apr 10 22:47:12 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 10 Apr 2012 13:47:12 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3503921 ] check_dhcp.c incorrectly setting source ip address as siaddr Message-ID: Bugs item #3503921, was opened at 2012-03-13 16:16 Message generated for change (Comment added) made by infotek411 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: infotek at gmail.com () Assigned to: Nobody/Anonymous (nobody) Summary: check_dhcp.c incorrectly setting source ip address as siaddr Initial Comment: nagios-plugins-1.4.15 plugins-root/check_dhcp.c Sets dhcp server source ip to the next server (siaddr) IP address, causing -s to fail to operate as expected. -s, --serverip=IPADDRESS IP address of DHCP server that we must hear from root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 275057756 (0x10650C5C) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.15 via 10.10.10.15 DHCPOFFER XID: 275057756 (0x10650C5C) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.15 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. 17:58:55.805403 IP (tos 0x0, ttl 128, id 20477, offset 0, flags [none], proto UDP (17), length 328) 10.10.10.15.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x10650c5c, Flags [none] (0x0000) Your-IP 10.10.10.166 Server-IP 10.10.10.24 Client-Ethernet-Address 00:22:19:56:99:48 file "kbox2000.0" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Subnet-Mask Option 1, length 4: 255.255.255.0 RN Option 58, length 4: 14400 RB Option 59, length 4: 25200 Lease-Time Option 51, length 4: 28800 Server-ID Option 54, length 4: 10.10.10.15 0x0000: 4500 0148 4ffd 0000 8011 d58f 0a0a 0a0f 0x0010: ffff ffff 0043 0044 0134 2e43 0201 0600 0x0020: 1065 0c5c 0000 0000 0000 0000 0a0a 0aa6 0x0030: 0a0a 0a18 0000 0000 0022 1956 9948 0000 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 0x0080: 0000 0000 0000 0000 6b62 6f78 3230 3030 0x0090: 2e30 0000 0000 0000 0000 0000 0000 0000 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 0x0100: 0000 0000 0000 0000 6382 5363 3501 0201 0x0110: 04ff ffff 003a 0400 0038 403b 0400 0062 0x0120: 7033 0400 0070 8036 040a 0a0a 0fff 0000 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 0x0140: 0000 0000 0000 0000 plugins-root/check_dhcp.c FIX /* If siaddr is non-zero, set "source" to siaddr */ /* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } */ ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 13:47 Message: Server is a Windows 2003 DHCP server with next-server "siaddr" set for PXE boot. ---------------------------------------------------------------------- Comment By: Andy () Date: 2012-04-09 08:00 Message: I get the "wrong" response without the above change also. DHCP is Windows Server 2008 R1 (actually SBS). We have a PXE Boot server and the check_dhcp thinks the PXE Boot is the actual server, which fails. ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-03-14 10:31 Message: What sort of DHCP server are you running? The plugin will only use "siaddr" in this way if the mandatory "server identifier" option is missing from the server's response. It seems the current code tried to fix some problem which showed up in certain environments with DHCP relays involved. However, in principle I agree that the plugin's interpretation of the "siaddr" field isn't correct. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:27 Message: diff --git a/a/plugins-root/check_dhcp.c b/b/plugins-root/check_dhcp.c index 2a1875c..b7f695b 100644 --- a/a/plugins-root/check_dhcp.c +++ b/b/plugins-root/check_dhcp.c @@ -588,10 +588,11 @@ int get_dhcp_offer(int sock){ memcpy(&via,&source,sizeof(source)) ; /* If siaddr is non-zero, set "source" to siaddr */ +/* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } - +*/ if(verbose){ printf(_("DHCPOFFER from IP address %s"),inet_ntoa(source.sin_addr)); printf(_(" via %s\n"),inet_ntoa(via.sin_addr)); ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:03 Message: I verified that I can check remote DHCP servers correctly after applying the fix. Options used were "check_dhcp -u -s 10.10.10.15". ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:47 Message: Example of -s being specified correctly in verbose mode. Fails because siaddr (10.10.10.24) is copied over source (10.10.10.15). root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v -s 10.10.10.15 Requested server address: 10.10.10.15 DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 513242689 (0x1E977641) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 513242689 (0x1E977641) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 CRITICAL: Received 1 DHCPOFFER(s), 0 of 1 requested servers responded, max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:33 Message: The ticket contains the output of check_dhcp after I fixed it (oops). Sorry :( Jason Ellison Below is the output from an unmodified version of check_dhcp : root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 1292513780 (0x4D0A31F4) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 1292513780 (0x4D0A31F4) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:22 Message: was trying to use google login... Jason Ellison infotek at gmail.com ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 From holger at CIS.FU-Berlin.DE Tue Apr 10 22:50:45 2012 From: holger at CIS.FU-Berlin.DE (Holger =?iso-8859-1?Q?Wei=DF?=) Date: Tue, 10 Apr 2012 22:50:45 +0200 Subject: [Nagiosplug-devel] New release planned this month In-Reply-To: References: <20120410102925.GA4598416@CIS.FU-Berlin.DE> Message-ID: <20120410205045.GF2496542@CIS.FU-Berlin.DE> * Frost, Mark {BIS} [2012-04-10 16:24]: > The patch I had submitted was id 2975393. > > I never looked at id 3414894, but it looks like it does something > similar. > > Is there anything I might be able to do that could help one of these > move along to a release? I'm assuming it's too late for this one, but > I'd like to know what it's nailed down for some future release. Looking into 2975393 and 3414894 is on my personal to-do list. I'll do that before the release. Holger From noreply at sourceforge.net Tue Apr 10 23:00:08 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 10 Apr 2012 14:00:08 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3191388 ] check_ldap doesn't accept --hostname option Message-ID: Bugs item #3191388, was opened at 2011-02-24 08:20 Message generated for change (Comment added) made by psychotrahe You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3191388&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Argument proccessing Group: release-1.4.15 >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: lgarrett (lgarrett) Assigned to: Nobody/Anonymous (nobody) Summary: check_ldap doesn't accept --hostname option Initial Comment: Although ./check_ldap -h prints: -H, --hostname=ADDRESS Host name, IP Address, or unix socket (must be an absolute path) The --hostname option bails out with: ./check_ldap: unrecognized option '--hostname=192.168.0.7' check_ldap v1.4.15 (nagios-plugins 1.4.15) ---------------------------------------------------------------------- Comment By: Matthias Eble (psychotrahe) Date: 2012-04-10 14:00 Message: This problem is now fixed in Git. Thank you for your report. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3191388&group_id=29880 From noreply at sourceforge.net Tue Apr 10 23:59:03 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 10 Apr 2012 14:59:03 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3503921 ] check_dhcp.c incorrectly setting source ip address as siaddr Message-ID: Bugs item #3503921, was opened at 2012-03-13 16:16 Message generated for change (Comment added) made by infotek411 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: infotek at gmail.com () Assigned to: Nobody/Anonymous (nobody) Summary: check_dhcp.c incorrectly setting source ip address as siaddr Initial Comment: nagios-plugins-1.4.15 plugins-root/check_dhcp.c Sets dhcp server source ip to the next server (siaddr) IP address, causing -s to fail to operate as expected. -s, --serverip=IPADDRESS IP address of DHCP server that we must hear from root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 275057756 (0x10650C5C) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.15 via 10.10.10.15 DHCPOFFER XID: 275057756 (0x10650C5C) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.15 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. 17:58:55.805403 IP (tos 0x0, ttl 128, id 20477, offset 0, flags [none], proto UDP (17), length 328) 10.10.10.15.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x10650c5c, Flags [none] (0x0000) Your-IP 10.10.10.166 Server-IP 10.10.10.24 Client-Ethernet-Address 00:22:19:56:99:48 file "kbox2000.0" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Subnet-Mask Option 1, length 4: 255.255.255.0 RN Option 58, length 4: 14400 RB Option 59, length 4: 25200 Lease-Time Option 51, length 4: 28800 Server-ID Option 54, length 4: 10.10.10.15 0x0000: 4500 0148 4ffd 0000 8011 d58f 0a0a 0a0f 0x0010: ffff ffff 0043 0044 0134 2e43 0201 0600 0x0020: 1065 0c5c 0000 0000 0000 0000 0a0a 0aa6 0x0030: 0a0a 0a18 0000 0000 0022 1956 9948 0000 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 0x0080: 0000 0000 0000 0000 6b62 6f78 3230 3030 0x0090: 2e30 0000 0000 0000 0000 0000 0000 0000 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 0x0100: 0000 0000 0000 0000 6382 5363 3501 0201 0x0110: 04ff ffff 003a 0400 0038 403b 0400 0062 0x0120: 7033 0400 0070 8036 040a 0a0a 0fff 0000 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 0x0140: 0000 0000 0000 0000 plugins-root/check_dhcp.c FIX /* If siaddr is non-zero, set "source" to siaddr */ /* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } */ ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 14:59 Message: In the tcpdump you can see the Server-ID (option 54) was set to 10.10.10.15 Server-ID Option 54, length 4: 10.10.10.15 0x36 (54) lenght 04 0a(10) 0a(10) 0a(10) 0f(15) 0x0120: 7033 0400 0070 8036 040a 0a0a 0f It appears to me that there is confusion of "Server Identifier" and "Server IP" that only comes up when one is using an siaddr. http://www.ietf.org/rfc/rfc2131.txt DHCP clarifies the interpretation of the 'siaddr' field as the address of the server to use in the next step of the client's bootstrap process. A DHCP server may return its own address in the 'siaddr' field, if the server is prepared to supply the next bootstrap service (e.g., delivery of an operating system executable image). A DHCP server always returns its own address in the 'server identifier' option. siaddr 4 IP address of next server to use in bootstrap; returned in DHCPOFFER, DHCPACK by server. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 13:47 Message: Server is a Windows 2003 DHCP server with next-server "siaddr" set for PXE boot. ---------------------------------------------------------------------- Comment By: Andy () Date: 2012-04-09 08:00 Message: I get the "wrong" response without the above change also. DHCP is Windows Server 2008 R1 (actually SBS). We have a PXE Boot server and the check_dhcp thinks the PXE Boot is the actual server, which fails. ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-03-14 10:31 Message: What sort of DHCP server are you running? The plugin will only use "siaddr" in this way if the mandatory "server identifier" option is missing from the server's response. It seems the current code tried to fix some problem which showed up in certain environments with DHCP relays involved. However, in principle I agree that the plugin's interpretation of the "siaddr" field isn't correct. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:27 Message: diff --git a/a/plugins-root/check_dhcp.c b/b/plugins-root/check_dhcp.c index 2a1875c..b7f695b 100644 --- a/a/plugins-root/check_dhcp.c +++ b/b/plugins-root/check_dhcp.c @@ -588,10 +588,11 @@ int get_dhcp_offer(int sock){ memcpy(&via,&source,sizeof(source)) ; /* If siaddr is non-zero, set "source" to siaddr */ +/* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } - +*/ if(verbose){ printf(_("DHCPOFFER from IP address %s"),inet_ntoa(source.sin_addr)); printf(_(" via %s\n"),inet_ntoa(via.sin_addr)); ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:03 Message: I verified that I can check remote DHCP servers correctly after applying the fix. Options used were "check_dhcp -u -s 10.10.10.15". ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:47 Message: Example of -s being specified correctly in verbose mode. Fails because siaddr (10.10.10.24) is copied over source (10.10.10.15). root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v -s 10.10.10.15 Requested server address: 10.10.10.15 DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 513242689 (0x1E977641) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 513242689 (0x1E977641) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 CRITICAL: Received 1 DHCPOFFER(s), 0 of 1 requested servers responded, max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:33 Message: The ticket contains the output of check_dhcp after I fixed it (oops). Sorry :( Jason Ellison Below is the output from an unmodified version of check_dhcp : root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 1292513780 (0x4D0A31F4) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 1292513780 (0x4D0A31F4) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:22 Message: was trying to use google login... Jason Ellison infotek at gmail.com ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 From infotek at gmail.com Wed Apr 11 00:12:53 2012 From: infotek at gmail.com (Jason Ellison) Date: Tue, 10 Apr 2012 17:12:53 -0500 Subject: [Nagiosplug-devel] New release planned this month In-Reply-To: <20120410205045.GF2496542@CIS.FU-Berlin.DE> References: <20120410102925.GA4598416@CIS.FU-Berlin.DE> <20120410205045.GF2496542@CIS.FU-Berlin.DE> Message-ID: check_dhcp.c incorrectly setting source ip address as siaddr - ID: 3503921 I submitted a patch, my most recent comment clarifies that it is indeed a bug. 2012/4/10 Holger Wei? : > * Frost, Mark {BIS} [2012-04-10 16:24]: >> The patch I had submitted was id 2975393. >> >> I never looked at id 3414894, but it looks like it does something >> similar. >> >> Is there anything I might be able to do that could help one of these >> move along to a release? ?I'm assuming it's too late for this one, but >> I'd like to know what it's nailed down for some future release. > > Looking into 2975393 and 3414894 is on my personal to-do list. ?I'll do > that before the release. > > Holger > > ------------------------------------------------------------------------------ > Better than sec? Nothing is better than sec when it comes to > monitoring Big Data applications. Try Boundary one-second > resolution app monitoring today. Free. > http://p.sf.net/sfu/Boundary-dev2dev > _______________________________________________________ > Nagios Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net > Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > ::: Please include plugins version (-v) and OS when reporting any issue. > ::: Messages without supporting info will risk being sent to /dev/null From noreply at sourceforge.net Wed Apr 11 00:17:50 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 10 Apr 2012 15:17:50 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3503921 ] check_dhcp.c incorrectly setting source ip address as siaddr Message-ID: Bugs item #3503921, was opened at 2012-03-13 16:16 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: infotek at gmail.com () Assigned to: Nobody/Anonymous (nobody) Summary: check_dhcp.c incorrectly setting source ip address as siaddr Initial Comment: nagios-plugins-1.4.15 plugins-root/check_dhcp.c Sets dhcp server source ip to the next server (siaddr) IP address, causing -s to fail to operate as expected. -s, --serverip=IPADDRESS IP address of DHCP server that we must hear from root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 275057756 (0x10650C5C) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.15 via 10.10.10.15 DHCPOFFER XID: 275057756 (0x10650C5C) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.15 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. 17:58:55.805403 IP (tos 0x0, ttl 128, id 20477, offset 0, flags [none], proto UDP (17), length 328) 10.10.10.15.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x10650c5c, Flags [none] (0x0000) Your-IP 10.10.10.166 Server-IP 10.10.10.24 Client-Ethernet-Address 00:22:19:56:99:48 file "kbox2000.0" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Subnet-Mask Option 1, length 4: 255.255.255.0 RN Option 58, length 4: 14400 RB Option 59, length 4: 25200 Lease-Time Option 51, length 4: 28800 Server-ID Option 54, length 4: 10.10.10.15 0x0000: 4500 0148 4ffd 0000 8011 d58f 0a0a 0a0f 0x0010: ffff ffff 0043 0044 0134 2e43 0201 0600 0x0020: 1065 0c5c 0000 0000 0000 0000 0a0a 0aa6 0x0030: 0a0a 0a18 0000 0000 0022 1956 9948 0000 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 0x0080: 0000 0000 0000 0000 6b62 6f78 3230 3030 0x0090: 2e30 0000 0000 0000 0000 0000 0000 0000 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 0x0100: 0000 0000 0000 0000 6382 5363 3501 0201 0x0110: 04ff ffff 003a 0400 0038 403b 0400 0062 0x0120: 7033 0400 0070 8036 040a 0a0a 0fff 0000 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 0x0140: 0000 0000 0000 0000 plugins-root/check_dhcp.c FIX /* If siaddr is non-zero, set "source" to siaddr */ /* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } */ ---------------------------------------------------------------------- >Comment By: Holger Weiss (hweiss) Date: 2012-04-10 15:17 Message: Hmm. As I said, I agree that the plugin's interpretation of the "siaddr" field is wrong. However, from reading the code, I wouldn't have expected the behavior you're reporting unless the "server identifier" option isn't set. So, I'd like to understand what's going on. Could you attach the dump of a DHCP session initiated by check_dhcp? ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 14:59 Message: In the tcpdump you can see the Server-ID (option 54) was set to 10.10.10.15 Server-ID Option 54, length 4: 10.10.10.15 0x36 (54) lenght 04 0a(10) 0a(10) 0a(10) 0f(15) 0x0120: 7033 0400 0070 8036 040a 0a0a 0f It appears to me that there is confusion of "Server Identifier" and "Server IP" that only comes up when one is using an siaddr. http://www.ietf.org/rfc/rfc2131.txt DHCP clarifies the interpretation of the 'siaddr' field as the address of the server to use in the next step of the client's bootstrap process. A DHCP server may return its own address in the 'siaddr' field, if the server is prepared to supply the next bootstrap service (e.g., delivery of an operating system executable image). A DHCP server always returns its own address in the 'server identifier' option. siaddr 4 IP address of next server to use in bootstrap; returned in DHCPOFFER, DHCPACK by server. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 13:47 Message: Server is a Windows 2003 DHCP server with next-server "siaddr" set for PXE boot. ---------------------------------------------------------------------- Comment By: Andy () Date: 2012-04-09 08:00 Message: I get the "wrong" response without the above change also. DHCP is Windows Server 2008 R1 (actually SBS). We have a PXE Boot server and the check_dhcp thinks the PXE Boot is the actual server, which fails. ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-03-14 10:31 Message: What sort of DHCP server are you running? The plugin will only use "siaddr" in this way if the mandatory "server identifier" option is missing from the server's response. It seems the current code tried to fix some problem which showed up in certain environments with DHCP relays involved. However, in principle I agree that the plugin's interpretation of the "siaddr" field isn't correct. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:27 Message: diff --git a/a/plugins-root/check_dhcp.c b/b/plugins-root/check_dhcp.c index 2a1875c..b7f695b 100644 --- a/a/plugins-root/check_dhcp.c +++ b/b/plugins-root/check_dhcp.c @@ -588,10 +588,11 @@ int get_dhcp_offer(int sock){ memcpy(&via,&source,sizeof(source)) ; /* If siaddr is non-zero, set "source" to siaddr */ +/* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } - +*/ if(verbose){ printf(_("DHCPOFFER from IP address %s"),inet_ntoa(source.sin_addr)); printf(_(" via %s\n"),inet_ntoa(via.sin_addr)); ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:03 Message: I verified that I can check remote DHCP servers correctly after applying the fix. Options used were "check_dhcp -u -s 10.10.10.15". ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:47 Message: Example of -s being specified correctly in verbose mode. Fails because siaddr (10.10.10.24) is copied over source (10.10.10.15). root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v -s 10.10.10.15 Requested server address: 10.10.10.15 DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 513242689 (0x1E977641) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 513242689 (0x1E977641) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 CRITICAL: Received 1 DHCPOFFER(s), 0 of 1 requested servers responded, max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:33 Message: The ticket contains the output of check_dhcp after I fixed it (oops). Sorry :( Jason Ellison Below is the output from an unmodified version of check_dhcp : root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 1292513780 (0x4D0A31F4) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 1292513780 (0x4D0A31F4) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:22 Message: was trying to use google login... Jason Ellison infotek at gmail.com ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 From holger at CIS.FU-Berlin.DE Wed Apr 11 00:21:34 2012 From: holger at CIS.FU-Berlin.DE (Holger =?iso-8859-1?Q?Wei=DF?=) Date: Wed, 11 Apr 2012 00:21:34 +0200 Subject: [Nagiosplug-devel] New release planned this month In-Reply-To: References: <20120410102925.GA4598416@CIS.FU-Berlin.DE> <20120410205045.GF2496542@CIS.FU-Berlin.DE> Message-ID: <20120410222134.GG2496542@CIS.FU-Berlin.DE> * Jason Ellison [2012-04-10 17:12]: > check_dhcp.c incorrectly setting source ip address as siaddr - ID: 3503921 > > I submitted a patch, my most recent comment clarifies that it is indeed a bug. Yes, I'd just like to try to understand what exactly is going on, first (see my last comment on the tracker item). Thanks, Holger From bryair01 at noa.nintendo.com Wed Apr 11 00:29:09 2012 From: bryair01 at noa.nintendo.com (Bryan Irvine) Date: Tue, 10 Apr 2012 22:29:09 +0000 Subject: [Nagiosplug-devel] New release planned this month In-Reply-To: <20120410102925.GA4598416@CIS.FU-Berlin.DE> References: <20120410102925.GA4598416@CIS.FU-Berlin.DE> Message-ID: Sorry for top-post, it seems like this community prefers that? If this is a vote I'd like to request that my header regex patch gets in. :-) http://comments.gmane.org/gmane.network.nagios.plugins.devel/7531 I've been using this in production for a couple of months now with no problems. Thanks, -Bryan -----Original Message----- From: Holger Wei? [mailto:holger at CIS.FU-Berlin.DE] Sent: Tuesday, April 10, 2012 3:29 AM To: Nagios Plugin Development Subject: [Nagiosplug-devel] New release planned this month As there are quite a few fixes and enhancements in the current Git code, we'd like to cut the 1.4.16 release sometime this month. Let us know if there's anything that must go in before the release. If you have some spare time to test the code, you could use the current snapshot: http://nagiosplug.sourceforge.net/snapshot/nagios-plugins-master.tar.gz Please report any bugs you find, especially any regressions. Holger ------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev _______________________________________________________ Nagios Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel ::: Please include plugins version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null From noreply at sourceforge.net Wed Apr 11 06:02:36 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 10 Apr 2012 21:02:36 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3503921 ] check_dhcp.c incorrectly setting source ip address as siaddr Message-ID: Bugs item #3503921, was opened at 2012-03-13 16:16 Message generated for change (Comment added) made by infotek411 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: infotek at gmail.com () Assigned to: Nobody/Anonymous (nobody) Summary: check_dhcp.c incorrectly setting source ip address as siaddr Initial Comment: nagios-plugins-1.4.15 plugins-root/check_dhcp.c Sets dhcp server source ip to the next server (siaddr) IP address, causing -s to fail to operate as expected. -s, --serverip=IPADDRESS IP address of DHCP server that we must hear from root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 275057756 (0x10650C5C) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.15 via 10.10.10.15 DHCPOFFER XID: 275057756 (0x10650C5C) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.15 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. 17:58:55.805403 IP (tos 0x0, ttl 128, id 20477, offset 0, flags [none], proto UDP (17), length 328) 10.10.10.15.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x10650c5c, Flags [none] (0x0000) Your-IP 10.10.10.166 Server-IP 10.10.10.24 Client-Ethernet-Address 00:22:19:56:99:48 file "kbox2000.0" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Subnet-Mask Option 1, length 4: 255.255.255.0 RN Option 58, length 4: 14400 RB Option 59, length 4: 25200 Lease-Time Option 51, length 4: 28800 Server-ID Option 54, length 4: 10.10.10.15 0x0000: 4500 0148 4ffd 0000 8011 d58f 0a0a 0a0f 0x0010: ffff ffff 0043 0044 0134 2e43 0201 0600 0x0020: 1065 0c5c 0000 0000 0000 0000 0a0a 0aa6 0x0030: 0a0a 0a18 0000 0000 0022 1956 9948 0000 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 0x0080: 0000 0000 0000 0000 6b62 6f78 3230 3030 0x0090: 2e30 0000 0000 0000 0000 0000 0000 0000 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 0x0100: 0000 0000 0000 0000 6382 5363 3501 0201 0x0110: 04ff ffff 003a 0400 0038 403b 0400 0062 0x0120: 7033 0400 0070 8036 040a 0a0a 0fff 0000 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 0x0140: 0000 0000 0000 0000 plugins-root/check_dhcp.c FIX /* If siaddr is non-zero, set "source" to siaddr */ /* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } */ ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 21:02 Message: gdb inspecting the local variables before it is source is clobbered by siaddr Breakpoint 1, get_dhcp_offer (sock=6) at check_dhcp.c:591 591 if(offer_packet.siaddr.s_addr != 0L){ after source is clobbered by siaddr Breakpoint 2, get_dhcp_offer (sock=6) at check_dhcp.c:595 595 if(verbose){ and before and after the conditional expression that sets source Breakpoint 3, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbf9d7460) at check_dhcp.c:910 910 new_offer->server_address=serv_ident.s_addr?serv_ident:source; Breakpoint 4, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbf9d7460) at check_dhcp.c:917 917 if(verbose){ # gdb ./plugins-root/check_dhcp GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-slackware-linux"... (gdb) set args -v (gdb) break 590 Breakpoint 1 at 0x804a808: file check_dhcp.c, line 590. (gdb) break 595 Breakpoint 2 at 0x804a815: file check_dhcp.c, line 595. (gdb) break 910 Breakpoint 3 at 0x8049e56: file check_dhcp.c, line 910. (gdb) break 917 Breakpoint 4 at 0x8049e83: file check_dhcp.c, line 917. (gdb) start Breakpoint 5 at 0x804aeb8: file check_dhcp.c, line 262. Starting program: /usr/local/src/nagios-plugins-1.4.15/plugins-root/check_dhcp -v [Thread debugging using libthread_db enabled] [New Thread 0xb7e466c0 (LWP 21323)] [Switching to Thread 0xb7e466c0 (LWP 21323)] main (argc=2, argv=0xbfd162c4) at check_dhcp.c:262 262 setlocale (LC_ALL, ""); (gdb) continue Continuing. DHCP socket: 6 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 8454682 (0x81021A) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK Breakpoint 1, get_dhcp_offer (sock=6) at check_dhcp.c:591 591 if(offer_packet.siaddr.s_addr != 0L){ (gdb) info locals offer_packet = {op = 2 '\002', htype = 1 '\001', hlen = 6 '\006', hops = 0 '\0', xid = 436371712, secs = 0, flags = 0, ciaddr = {s_addr = 0}, yiaddr = {s_addr = 1879706122}, siaddr = {s_addr = 403311114}, giaddr = {s_addr = 0}, chaddr = "\000\"\031V\231H\000\000\000\000\000\000\000\000\000", sname = '\0' , file = "kbox2000.0", '\0' , options = "c\202Sc5\001\002\001\004???\000:\004\000\0008@;\004\000\000bp3\004\000\000p\2006\004\n\n\n\017?", '\0' } source = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} via = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} result = 0 responses = 1 x = 6 start_time = 1334116496 current_time = (gdb) continue Continuing. Breakpoint 2, get_dhcp_offer (sock=6) at check_dhcp.c:595 595 if(verbose){ (gdb) info locals offer_packet = {op = 2 '\002', htype = 1 '\001', hlen = 6 '\006', hops = 0 '\0', xid = 436371712, secs = 0, flags = 0, ciaddr = {s_addr = 0}, yiaddr = {s_addr = 1879706122}, siaddr = {s_addr = 403311114}, giaddr = {s_addr = 0}, chaddr = "\000\"\031V\231H\000\000\000\000\000\000\000\000\000", sname = '\0' , file = "kbox2000.0", '\0' , options = "c\202Sc5\001\002\001\004???\000:\004\000\0008@;\004\000\000bp3\004\000\000p\2006\004\n\n\n\017?", '\0' } source = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 403311114}, sin_zero = "\000\000\000\000\000\000\000"} via = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} result = 0 responses = 1 x = 6 start_time = 1334116496 current_time = (gdb) continue Continuing. DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 8454682 (0x81021A) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.112 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Breakpoint 3, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbfd15fa0) at check_dhcp.c:910 910 new_offer->server_address=serv_ident.s_addr?serv_ident:source; (gdb) info locals x = option_type = 25200 option_length = 4 serv_ident = {s_addr = 0} (gdb) continue Continuing. Breakpoint 4, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbfd15fa0) at check_dhcp.c:917 917 if(verbose){ (gdb) info locals x = option_type = 25200 option_length = 4 serv_ident = {s_addr = 0} (gdb) continue Continuing. Added offer from server @ 10.10.10.24 of IP address 10.10.10.112 Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. Program exited normally. (gdb) quit tcpdump (saved the pcap also) root at nagios:/usr/local/src/nagios-plugins-1.4.15# tcpdump -nvvvxX -r check_dhcp.pcap reading from file check_dhcp.pcap, link-type EN10MB (Ethernet) 22:28:36.929010 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 576) 10.10.10.26.68 > 255.255.255.255.67: [bad udp cksum e6d!] BOOTP/DHCP, Request from 00:22:19:56:99:48, length 548, xid 0x6247da8b, secs 65280, Flags [Broadcast] (0x8000) Client-Ethernet-Address 00:22:19:56:99:48 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Discover END Option 255, length 0 PAD Option 0, length 0, occurs 304 0x0000: 4500 0240 0000 4000 4011 248a 0a0a 0a1a E.. at ..@. at .$..... 0x0010: ffff ffff 0044 0043 022c 1661 0101 0600 .....D.C.,.a.... 0x0020: 6247 da8b ff00 8000 0000 0000 0000 0000 bG.............. 0x0030: 0000 0000 0000 0000 0022 1956 9948 0000 .........".V.H.. 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0090: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0100: 0000 0000 0000 0000 6382 5363 3501 01ff ........c.Sc5... 0x0110: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0120: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0140: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0150: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0160: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0170: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0180: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0190: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0200: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0210: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0220: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0230: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 22:28:36.929258 IP (tos 0x0, ttl 128, id 22737, offset 0, flags [none], proto UDP (17), length 328) 10.10.10.15.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x6247da8b, Flags [none] (0x0000) Your-IP 10.10.10.112 Server-IP 10.10.10.24 Client-Ethernet-Address 00:22:19:56:99:48 file "kbox2000.0" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Subnet-Mask Option 1, length 4: 255.255.255.0 RN Option 58, length 4: 14400 RB Option 59, length 4: 25200 Lease-Time Option 51, length 4: 28800 Server-ID Option 54, length 4: 10.10.10.15 END Option 255, length 0 PAD Option 0, length 0, occurs 26 0x0000: 4500 0148 58d1 0000 8011 ccbb 0a0a 0a0f E..HX........... 0x0010: ffff ffff 0043 0044 0134 0e67 0201 0600 .....C.D.4.g.... 0x0020: 6247 da8b 0000 0000 0000 0000 0a0a 0a70 bG.............p 0x0030: 0a0a 0a18 0000 0000 0022 1956 9948 0000 .........".V.H.. 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0080: 0000 0000 0000 0000 6b62 6f78 3230 3030 ........kbox2000 0x0090: 2e30 0000 0000 0000 0000 0000 0000 0000 .0.............. 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0100: 0000 0000 0000 0000 6382 5363 3501 0201 ........c.Sc5... 0x0110: 04ff ffff 003a 0400 0038 403b 0400 0062 .....:...8@;...b 0x0120: 7033 0400 0070 8036 040a 0a0a 0fff 0000 p3...p.6........ 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0140: 0000 0000 0000 0000 ........ ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-04-10 15:17 Message: Hmm. As I said, I agree that the plugin's interpretation of the "siaddr" field is wrong. However, from reading the code, I wouldn't have expected the behavior you're reporting unless the "server identifier" option isn't set. So, I'd like to understand what's going on. Could you attach the dump of a DHCP session initiated by check_dhcp? ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 14:59 Message: In the tcpdump you can see the Server-ID (option 54) was set to 10.10.10.15 Server-ID Option 54, length 4: 10.10.10.15 0x36 (54) lenght 04 0a(10) 0a(10) 0a(10) 0f(15) 0x0120: 7033 0400 0070 8036 040a 0a0a 0f It appears to me that there is confusion of "Server Identifier" and "Server IP" that only comes up when one is using an siaddr. http://www.ietf.org/rfc/rfc2131.txt DHCP clarifies the interpretation of the 'siaddr' field as the address of the server to use in the next step of the client's bootstrap process. A DHCP server may return its own address in the 'siaddr' field, if the server is prepared to supply the next bootstrap service (e.g., delivery of an operating system executable image). A DHCP server always returns its own address in the 'server identifier' option. siaddr 4 IP address of next server to use in bootstrap; returned in DHCPOFFER, DHCPACK by server. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 13:47 Message: Server is a Windows 2003 DHCP server with next-server "siaddr" set for PXE boot. ---------------------------------------------------------------------- Comment By: Andy () Date: 2012-04-09 08:00 Message: I get the "wrong" response without the above change also. DHCP is Windows Server 2008 R1 (actually SBS). We have a PXE Boot server and the check_dhcp thinks the PXE Boot is the actual server, which fails. ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-03-14 10:31 Message: What sort of DHCP server are you running? The plugin will only use "siaddr" in this way if the mandatory "server identifier" option is missing from the server's response. It seems the current code tried to fix some problem which showed up in certain environments with DHCP relays involved. However, in principle I agree that the plugin's interpretation of the "siaddr" field isn't correct. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:27 Message: diff --git a/a/plugins-root/check_dhcp.c b/b/plugins-root/check_dhcp.c index 2a1875c..b7f695b 100644 --- a/a/plugins-root/check_dhcp.c +++ b/b/plugins-root/check_dhcp.c @@ -588,10 +588,11 @@ int get_dhcp_offer(int sock){ memcpy(&via,&source,sizeof(source)) ; /* If siaddr is non-zero, set "source" to siaddr */ +/* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } - +*/ if(verbose){ printf(_("DHCPOFFER from IP address %s"),inet_ntoa(source.sin_addr)); printf(_(" via %s\n"),inet_ntoa(via.sin_addr)); ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:03 Message: I verified that I can check remote DHCP servers correctly after applying the fix. Options used were "check_dhcp -u -s 10.10.10.15". ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:47 Message: Example of -s being specified correctly in verbose mode. Fails because siaddr (10.10.10.24) is copied over source (10.10.10.15). root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v -s 10.10.10.15 Requested server address: 10.10.10.15 DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 513242689 (0x1E977641) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 513242689 (0x1E977641) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 CRITICAL: Received 1 DHCPOFFER(s), 0 of 1 requested servers responded, max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:33 Message: The ticket contains the output of check_dhcp after I fixed it (oops). Sorry :( Jason Ellison Below is the output from an unmodified version of check_dhcp : root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 1292513780 (0x4D0A31F4) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 1292513780 (0x4D0A31F4) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:22 Message: was trying to use google login... Jason Ellison infotek at gmail.com ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 From ae at op5.se Wed Apr 11 17:02:15 2012 From: ae at op5.se (Andreas Ericsson) Date: Wed, 11 Apr 2012 17:02:15 +0200 Subject: [Nagiosplug-devel] Move repositories to Github? In-Reply-To: <20120410195943.GE2496542@CIS.FU-Berlin.DE> References: <20120410124205.GD2496542@CIS.FU-Berlin.DE> <4F842C54.9030905@op5.se> <20120410195943.GE2496542@CIS.FU-Berlin.DE> Message-ID: <4F859CF7.6070708@op5.se> On 04/10/2012 09:59 PM, Holger Wei? wrote: > * Andreas Ericsson [2012-04-10 14:49]: >> On 04/10/2012 02:42 PM, Holger Wei? wrote: >>> I'd like to move our repositories over to Github, as I believe that >>> would make things easier for both the community and those who review and >>> apply contributions. Some people have already expressed a desire to >>> submit patches via pull requests on Github. >> >> pull requests can be emailed from anywhere though, so it's not exactly >> a strong argument. > > Personally, I'd actually prefer receiving commits via email (as I'm not > all that keen on clicking around in web interfaces), but from what I've > seen elsewhere, Github just works better for most contributors. Yes, > git-send-email(1) works fine for some communities such as the Git > project itself, but I fear it might not work as well for our community. > There's a "git-request-pull" script in git since before v1.0 that people can use to send you info on where to pull their changes from no matter where they keep their repos. >>> The only downside I see is that the list of team members would have to >>> be maintained both at Github and at SourceForge. That's not a big deal. >> >> Why? Just move to github completely and you needn't bother with sf at all, >> except maybe for new releases where you have to upload a tarball once in a >> blue moon. > > I just don't want to invest the time to look into the conversion of > tracker items and stuff like that right now. > Sensible. >> If most contributors think it's easier, go with it. I see no reason >> what so ever to make life harder than necessary for contributors, and >> if a github "fork+request pull" workflow is what they want; Just go >> with it. > > That's what I thought. > > Thanks for your feedback! > You're welcome, but see the thing about request-pull up above though. There's no point making life harder for you either, so if you prefer sf, just keep your stuff there and let others maintain their things wherever they want. -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. From holger at CIS.FU-Berlin.DE Wed Apr 11 19:47:36 2012 From: holger at CIS.FU-Berlin.DE (Holger =?iso-8859-1?Q?Wei=DF?=) Date: Wed, 11 Apr 2012 19:47:36 +0200 Subject: [Nagiosplug-devel] Move repositories to Github? In-Reply-To: <4F859CF7.6070708@op5.se> References: <20120410124205.GD2496542@CIS.FU-Berlin.DE> <4F842C54.9030905@op5.se> <20120410195943.GE2496542@CIS.FU-Berlin.DE> <4F859CF7.6070708@op5.se> Message-ID: <20120411174736.GI2496542@CIS.FU-Berlin.DE> * Andreas Ericsson [2012-04-11 17:02]: > On 04/10/2012 09:59 PM, Holger Wei? wrote: > > Personally, I'd actually prefer receiving commits via email (as I'm not > > all that keen on clicking around in web interfaces), but from what I've > > seen elsewhere, Github just works better for most contributors. Yes, > > git-send-email(1) works fine for some communities such as the Git > > project itself, but I fear it might not work as well for our community. > > There's a "git-request-pull" script in git since before v1.0 that people > can use to send you info on where to pull their changes from no matter > where they keep their repos. I thought about that as well, I just fear we'll end up with less pull requests (and more plain diffs) when people have to learn to use that script and copy its output into an email instead of clicking on Github's pull request knob, even though the difference is mostly a psychological one. Maybe I'm just overrating the Github hipe ... Holger From noreply at sourceforge.net Wed Apr 11 20:04:21 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 11 Apr 2012 11:04:21 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3503921 ] check_dhcp.c incorrectly setting source ip address as siaddr Message-ID: Bugs item #3503921, was opened at 2012-03-13 16:16 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: infotek at gmail.com () Assigned to: Nobody/Anonymous (nobody) Summary: check_dhcp.c incorrectly setting source ip address as siaddr Initial Comment: nagios-plugins-1.4.15 plugins-root/check_dhcp.c Sets dhcp server source ip to the next server (siaddr) IP address, causing -s to fail to operate as expected. -s, --serverip=IPADDRESS IP address of DHCP server that we must hear from root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 275057756 (0x10650C5C) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.15 via 10.10.10.15 DHCPOFFER XID: 275057756 (0x10650C5C) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.15 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. 17:58:55.805403 IP (tos 0x0, ttl 128, id 20477, offset 0, flags [none], proto UDP (17), length 328) 10.10.10.15.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x10650c5c, Flags [none] (0x0000) Your-IP 10.10.10.166 Server-IP 10.10.10.24 Client-Ethernet-Address 00:22:19:56:99:48 file "kbox2000.0" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Subnet-Mask Option 1, length 4: 255.255.255.0 RN Option 58, length 4: 14400 RB Option 59, length 4: 25200 Lease-Time Option 51, length 4: 28800 Server-ID Option 54, length 4: 10.10.10.15 0x0000: 4500 0148 4ffd 0000 8011 d58f 0a0a 0a0f 0x0010: ffff ffff 0043 0044 0134 2e43 0201 0600 0x0020: 1065 0c5c 0000 0000 0000 0000 0a0a 0aa6 0x0030: 0a0a 0a18 0000 0000 0022 1956 9948 0000 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 0x0080: 0000 0000 0000 0000 6b62 6f78 3230 3030 0x0090: 2e30 0000 0000 0000 0000 0000 0000 0000 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 0x0100: 0000 0000 0000 0000 6382 5363 3501 0201 0x0110: 04ff ffff 003a 0400 0038 403b 0400 0062 0x0120: 7033 0400 0070 8036 040a 0a0a 0fff 0000 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 0x0140: 0000 0000 0000 0000 plugins-root/check_dhcp.c FIX /* If siaddr is non-zero, set "source" to siaddr */ /* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } */ ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-04-11 11:04 Message: Thank you very much. I've attached a patch, could you check whether it solves the problem? ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 21:02 Message: gdb inspecting the local variables before it is source is clobbered by siaddr Breakpoint 1, get_dhcp_offer (sock=6) at check_dhcp.c:591 591 if(offer_packet.siaddr.s_addr != 0L){ after source is clobbered by siaddr Breakpoint 2, get_dhcp_offer (sock=6) at check_dhcp.c:595 595 if(verbose){ and before and after the conditional expression that sets source Breakpoint 3, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbf9d7460) at check_dhcp.c:910 910 new_offer->server_address=serv_ident.s_addr?serv_ident:source; Breakpoint 4, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbf9d7460) at check_dhcp.c:917 917 if(verbose){ # gdb ./plugins-root/check_dhcp GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-slackware-linux"... (gdb) set args -v (gdb) break 590 Breakpoint 1 at 0x804a808: file check_dhcp.c, line 590. (gdb) break 595 Breakpoint 2 at 0x804a815: file check_dhcp.c, line 595. (gdb) break 910 Breakpoint 3 at 0x8049e56: file check_dhcp.c, line 910. (gdb) break 917 Breakpoint 4 at 0x8049e83: file check_dhcp.c, line 917. (gdb) start Breakpoint 5 at 0x804aeb8: file check_dhcp.c, line 262. Starting program: /usr/local/src/nagios-plugins-1.4.15/plugins-root/check_dhcp -v [Thread debugging using libthread_db enabled] [New Thread 0xb7e466c0 (LWP 21323)] [Switching to Thread 0xb7e466c0 (LWP 21323)] main (argc=2, argv=0xbfd162c4) at check_dhcp.c:262 262 setlocale (LC_ALL, ""); (gdb) continue Continuing. DHCP socket: 6 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 8454682 (0x81021A) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK Breakpoint 1, get_dhcp_offer (sock=6) at check_dhcp.c:591 591 if(offer_packet.siaddr.s_addr != 0L){ (gdb) info locals offer_packet = {op = 2 '\002', htype = 1 '\001', hlen = 6 '\006', hops = 0 '\0', xid = 436371712, secs = 0, flags = 0, ciaddr = {s_addr = 0}, yiaddr = {s_addr = 1879706122}, siaddr = {s_addr = 403311114}, giaddr = {s_addr = 0}, chaddr = "\000\"\031V\231H\000\000\000\000\000\000\000\000\000", sname = '\0' , file = "kbox2000.0", '\0' , options = "c\202Sc5\001\002\001\004???\000:\004\000\0008@;\004\000\000bp3\004\000\000p\2006\004\n\n\n\017?", '\0' } source = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} via = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} result = 0 responses = 1 x = 6 start_time = 1334116496 current_time = (gdb) continue Continuing. Breakpoint 2, get_dhcp_offer (sock=6) at check_dhcp.c:595 595 if(verbose){ (gdb) info locals offer_packet = {op = 2 '\002', htype = 1 '\001', hlen = 6 '\006', hops = 0 '\0', xid = 436371712, secs = 0, flags = 0, ciaddr = {s_addr = 0}, yiaddr = {s_addr = 1879706122}, siaddr = {s_addr = 403311114}, giaddr = {s_addr = 0}, chaddr = "\000\"\031V\231H\000\000\000\000\000\000\000\000\000", sname = '\0' , file = "kbox2000.0", '\0' , options = "c\202Sc5\001\002\001\004???\000:\004\000\0008@;\004\000\000bp3\004\000\000p\2006\004\n\n\n\017?", '\0' } source = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 403311114}, sin_zero = "\000\000\000\000\000\000\000"} via = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} result = 0 responses = 1 x = 6 start_time = 1334116496 current_time = (gdb) continue Continuing. DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 8454682 (0x81021A) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.112 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Breakpoint 3, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbfd15fa0) at check_dhcp.c:910 910 new_offer->server_address=serv_ident.s_addr?serv_ident:source; (gdb) info locals x = option_type = 25200 option_length = 4 serv_ident = {s_addr = 0} (gdb) continue Continuing. Breakpoint 4, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbfd15fa0) at check_dhcp.c:917 917 if(verbose){ (gdb) info locals x = option_type = 25200 option_length = 4 serv_ident = {s_addr = 0} (gdb) continue Continuing. Added offer from server @ 10.10.10.24 of IP address 10.10.10.112 Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. Program exited normally. (gdb) quit tcpdump (saved the pcap also) root at nagios:/usr/local/src/nagios-plugins-1.4.15# tcpdump -nvvvxX -r check_dhcp.pcap reading from file check_dhcp.pcap, link-type EN10MB (Ethernet) 22:28:36.929010 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 576) 10.10.10.26.68 > 255.255.255.255.67: [bad udp cksum e6d!] BOOTP/DHCP, Request from 00:22:19:56:99:48, length 548, xid 0x6247da8b, secs 65280, Flags [Broadcast] (0x8000) Client-Ethernet-Address 00:22:19:56:99:48 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Discover END Option 255, length 0 PAD Option 0, length 0, occurs 304 0x0000: 4500 0240 0000 4000 4011 248a 0a0a 0a1a E.. at ..@. at .$..... 0x0010: ffff ffff 0044 0043 022c 1661 0101 0600 .....D.C.,.a.... 0x0020: 6247 da8b ff00 8000 0000 0000 0000 0000 bG.............. 0x0030: 0000 0000 0000 0000 0022 1956 9948 0000 .........".V.H.. 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0090: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0100: 0000 0000 0000 0000 6382 5363 3501 01ff ........c.Sc5... 0x0110: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0120: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0140: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0150: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0160: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0170: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0180: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0190: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0200: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0210: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0220: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0230: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 22:28:36.929258 IP (tos 0x0, ttl 128, id 22737, offset 0, flags [none], proto UDP (17), length 328) 10.10.10.15.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x6247da8b, Flags [none] (0x0000) Your-IP 10.10.10.112 Server-IP 10.10.10.24 Client-Ethernet-Address 00:22:19:56:99:48 file "kbox2000.0" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Subnet-Mask Option 1, length 4: 255.255.255.0 RN Option 58, length 4: 14400 RB Option 59, length 4: 25200 Lease-Time Option 51, length 4: 28800 Server-ID Option 54, length 4: 10.10.10.15 END Option 255, length 0 PAD Option 0, length 0, occurs 26 0x0000: 4500 0148 58d1 0000 8011 ccbb 0a0a 0a0f E..HX........... 0x0010: ffff ffff 0043 0044 0134 0e67 0201 0600 .....C.D.4.g.... 0x0020: 6247 da8b 0000 0000 0000 0000 0a0a 0a70 bG.............p 0x0030: 0a0a 0a18 0000 0000 0022 1956 9948 0000 .........".V.H.. 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0080: 0000 0000 0000 0000 6b62 6f78 3230 3030 ........kbox2000 0x0090: 2e30 0000 0000 0000 0000 0000 0000 0000 .0.............. 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0100: 0000 0000 0000 0000 6382 5363 3501 0201 ........c.Sc5... 0x0110: 04ff ffff 003a 0400 0038 403b 0400 0062 .....:...8@;...b 0x0120: 7033 0400 0070 8036 040a 0a0a 0fff 0000 p3...p.6........ 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0140: 0000 0000 0000 0000 ........ ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-04-10 15:17 Message: Hmm. As I said, I agree that the plugin's interpretation of the "siaddr" field is wrong. However, from reading the code, I wouldn't have expected the behavior you're reporting unless the "server identifier" option isn't set. So, I'd like to understand what's going on. Could you attach the dump of a DHCP session initiated by check_dhcp? ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 14:59 Message: In the tcpdump you can see the Server-ID (option 54) was set to 10.10.10.15 Server-ID Option 54, length 4: 10.10.10.15 0x36 (54) lenght 04 0a(10) 0a(10) 0a(10) 0f(15) 0x0120: 7033 0400 0070 8036 040a 0a0a 0f It appears to me that there is confusion of "Server Identifier" and "Server IP" that only comes up when one is using an siaddr. http://www.ietf.org/rfc/rfc2131.txt DHCP clarifies the interpretation of the 'siaddr' field as the address of the server to use in the next step of the client's bootstrap process. A DHCP server may return its own address in the 'siaddr' field, if the server is prepared to supply the next bootstrap service (e.g., delivery of an operating system executable image). A DHCP server always returns its own address in the 'server identifier' option. siaddr 4 IP address of next server to use in bootstrap; returned in DHCPOFFER, DHCPACK by server. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 13:47 Message: Server is a Windows 2003 DHCP server with next-server "siaddr" set for PXE boot. ---------------------------------------------------------------------- Comment By: Andy () Date: 2012-04-09 08:00 Message: I get the "wrong" response without the above change also. DHCP is Windows Server 2008 R1 (actually SBS). We have a PXE Boot server and the check_dhcp thinks the PXE Boot is the actual server, which fails. ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-03-14 10:31 Message: What sort of DHCP server are you running? The plugin will only use "siaddr" in this way if the mandatory "server identifier" option is missing from the server's response. It seems the current code tried to fix some problem which showed up in certain environments with DHCP relays involved. However, in principle I agree that the plugin's interpretation of the "siaddr" field isn't correct. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:27 Message: diff --git a/a/plugins-root/check_dhcp.c b/b/plugins-root/check_dhcp.c index 2a1875c..b7f695b 100644 --- a/a/plugins-root/check_dhcp.c +++ b/b/plugins-root/check_dhcp.c @@ -588,10 +588,11 @@ int get_dhcp_offer(int sock){ memcpy(&via,&source,sizeof(source)) ; /* If siaddr is non-zero, set "source" to siaddr */ +/* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } - +*/ if(verbose){ printf(_("DHCPOFFER from IP address %s"),inet_ntoa(source.sin_addr)); printf(_(" via %s\n"),inet_ntoa(via.sin_addr)); ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:03 Message: I verified that I can check remote DHCP servers correctly after applying the fix. Options used were "check_dhcp -u -s 10.10.10.15". ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:47 Message: Example of -s being specified correctly in verbose mode. Fails because siaddr (10.10.10.24) is copied over source (10.10.10.15). root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v -s 10.10.10.15 Requested server address: 10.10.10.15 DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 513242689 (0x1E977641) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 513242689 (0x1E977641) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 CRITICAL: Received 1 DHCPOFFER(s), 0 of 1 requested servers responded, max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:33 Message: The ticket contains the output of check_dhcp after I fixed it (oops). Sorry :( Jason Ellison Below is the output from an unmodified version of check_dhcp : root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 1292513780 (0x4D0A31F4) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 1292513780 (0x4D0A31F4) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:22 Message: was trying to use google login... Jason Ellison infotek at gmail.com ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 From noreply at sourceforge.net Fri Apr 13 06:07:58 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 12 Apr 2012 21:07:58 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3503921 ] check_dhcp.c incorrectly setting source ip address as siaddr Message-ID: Bugs item #3503921, was opened at 2012-03-13 16:16 Message generated for change (Comment added) made by infotek411 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: infotek at gmail.com () Assigned to: Nobody/Anonymous (nobody) Summary: check_dhcp.c incorrectly setting source ip address as siaddr Initial Comment: nagios-plugins-1.4.15 plugins-root/check_dhcp.c Sets dhcp server source ip to the next server (siaddr) IP address, causing -s to fail to operate as expected. -s, --serverip=IPADDRESS IP address of DHCP server that we must hear from root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 275057756 (0x10650C5C) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.15 via 10.10.10.15 DHCPOFFER XID: 275057756 (0x10650C5C) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.15 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. 17:58:55.805403 IP (tos 0x0, ttl 128, id 20477, offset 0, flags [none], proto UDP (17), length 328) 10.10.10.15.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x10650c5c, Flags [none] (0x0000) Your-IP 10.10.10.166 Server-IP 10.10.10.24 Client-Ethernet-Address 00:22:19:56:99:48 file "kbox2000.0" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Subnet-Mask Option 1, length 4: 255.255.255.0 RN Option 58, length 4: 14400 RB Option 59, length 4: 25200 Lease-Time Option 51, length 4: 28800 Server-ID Option 54, length 4: 10.10.10.15 0x0000: 4500 0148 4ffd 0000 8011 d58f 0a0a 0a0f 0x0010: ffff ffff 0043 0044 0134 2e43 0201 0600 0x0020: 1065 0c5c 0000 0000 0000 0000 0a0a 0aa6 0x0030: 0a0a 0a18 0000 0000 0022 1956 9948 0000 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 0x0080: 0000 0000 0000 0000 6b62 6f78 3230 3030 0x0090: 2e30 0000 0000 0000 0000 0000 0000 0000 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 0x0100: 0000 0000 0000 0000 6382 5363 3501 0201 0x0110: 04ff ffff 003a 0400 0038 403b 0400 0062 0x0120: 7033 0400 0070 8036 040a 0a0a 0fff 0000 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 0x0140: 0000 0000 0000 0000 plugins-root/check_dhcp.c FIX /* If siaddr is non-zero, set "source" to siaddr */ /* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } */ ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-12 21:07 Message: That did solve the abort issue when parsing the options, which in turn allowed serv_ident to be set. It brought out a bug in the OPTION parsing in the switch while in verbose mode I also got rid of the source = siaddr. --- ./a/plugins-root/check_dhcp.c 2010-07-27 15:47:16.000000000 -0500 +++ ./b/plugins-root/check_dhcp.c 2012-04-12 22:58:56.000000000 -0500 @@ -141,7 +141,7 @@ u_int16_t flags; /* flags */ struct in_addr ciaddr; /* IP address of this machine (if we already have one) */ struct in_addr yiaddr; /* IP address of this machine (offered by the DHCP server) */ - struct in_addr siaddr; /* IP address of DHCP server */ + struct in_addr siaddr; /* IP address of next server */ struct in_addr giaddr; /* IP address of DHCP relay */ unsigned char chaddr [MAX_DHCP_CHADDR_LENGTH]; /* hardware address of this machine */ char sname [MAX_DHCP_SNAME_LENGTH]; /* name of DHCP server */ @@ -587,11 +587,6 @@ /* Save a copy of "source" into "via" even if it's via itself */ memcpy(&via,&source,sizeof(source)) ; - /* If siaddr is non-zero, set "source" to siaddr */ - if(offer_packet.siaddr.s_addr != 0L){ - source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; - } - if(verbose){ printf(_("DHCPOFFER from IP address %s"),inet_ntoa(source.sin_addr)); printf(_(" via %s\n"),inet_ntoa(via.sin_addr)); @@ -840,7 +835,7 @@ for(x=4;xoptions[x]==-1 || (int)offer_packet->options[x]==0) + if((int)offer_packet->options[x]==-1) break; /* get option type */ @@ -870,10 +865,7 @@ memcpy(&serv_ident.s_addr, &offer_packet->options[x],sizeof(serv_ident.s_addr)); break; } - - /* skip option data we're ignoring */ - if(option_type!=DHCP_OPTION_REBINDING_TIME) - x+=option_length; + x+=option_length; } if(verbose){ @@ -903,9 +895,9 @@ * the next bootstrap service (e.g., delivery of an operating system * executable image). A DHCP server always returns its own address in * the 'server identifier' option." 'serv_ident' is the 'server - * identifier' option, 'source' is the 'siaddr' field or (if 'siaddr' - * wasn't available) the IP address we received the DHCPOFFER from. If - * 'serv_ident' isn't available for some reason, we use 'source'. + * identifier' option, 'source' is the IP address we received the + * DHCPOFFER from. If 'serv_ident' isn't available for some reason, we + * use 'source'. */ new_offer->server_address=serv_ident.s_addr?serv_ident:source; new_offer->offered_address=offer_packet->yiaddr; ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-04-11 11:04 Message: Thank you very much. I've attached a patch, could you check whether it solves the problem? ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 21:02 Message: gdb inspecting the local variables before it is source is clobbered by siaddr Breakpoint 1, get_dhcp_offer (sock=6) at check_dhcp.c:591 591 if(offer_packet.siaddr.s_addr != 0L){ after source is clobbered by siaddr Breakpoint 2, get_dhcp_offer (sock=6) at check_dhcp.c:595 595 if(verbose){ and before and after the conditional expression that sets source Breakpoint 3, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbf9d7460) at check_dhcp.c:910 910 new_offer->server_address=serv_ident.s_addr?serv_ident:source; Breakpoint 4, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbf9d7460) at check_dhcp.c:917 917 if(verbose){ # gdb ./plugins-root/check_dhcp GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-slackware-linux"... (gdb) set args -v (gdb) break 590 Breakpoint 1 at 0x804a808: file check_dhcp.c, line 590. (gdb) break 595 Breakpoint 2 at 0x804a815: file check_dhcp.c, line 595. (gdb) break 910 Breakpoint 3 at 0x8049e56: file check_dhcp.c, line 910. (gdb) break 917 Breakpoint 4 at 0x8049e83: file check_dhcp.c, line 917. (gdb) start Breakpoint 5 at 0x804aeb8: file check_dhcp.c, line 262. Starting program: /usr/local/src/nagios-plugins-1.4.15/plugins-root/check_dhcp -v [Thread debugging using libthread_db enabled] [New Thread 0xb7e466c0 (LWP 21323)] [Switching to Thread 0xb7e466c0 (LWP 21323)] main (argc=2, argv=0xbfd162c4) at check_dhcp.c:262 262 setlocale (LC_ALL, ""); (gdb) continue Continuing. DHCP socket: 6 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 8454682 (0x81021A) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK Breakpoint 1, get_dhcp_offer (sock=6) at check_dhcp.c:591 591 if(offer_packet.siaddr.s_addr != 0L){ (gdb) info locals offer_packet = {op = 2 '\002', htype = 1 '\001', hlen = 6 '\006', hops = 0 '\0', xid = 436371712, secs = 0, flags = 0, ciaddr = {s_addr = 0}, yiaddr = {s_addr = 1879706122}, siaddr = {s_addr = 403311114}, giaddr = {s_addr = 0}, chaddr = "\000\"\031V\231H\000\000\000\000\000\000\000\000\000", sname = '\0' , file = "kbox2000.0", '\0' , options = "c\202Sc5\001\002\001\004???\000:\004\000\0008@;\004\000\000bp3\004\000\000p\2006\004\n\n\n\017?", '\0' } source = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} via = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} result = 0 responses = 1 x = 6 start_time = 1334116496 current_time = (gdb) continue Continuing. Breakpoint 2, get_dhcp_offer (sock=6) at check_dhcp.c:595 595 if(verbose){ (gdb) info locals offer_packet = {op = 2 '\002', htype = 1 '\001', hlen = 6 '\006', hops = 0 '\0', xid = 436371712, secs = 0, flags = 0, ciaddr = {s_addr = 0}, yiaddr = {s_addr = 1879706122}, siaddr = {s_addr = 403311114}, giaddr = {s_addr = 0}, chaddr = "\000\"\031V\231H\000\000\000\000\000\000\000\000\000", sname = '\0' , file = "kbox2000.0", '\0' , options = "c\202Sc5\001\002\001\004???\000:\004\000\0008@;\004\000\000bp3\004\000\000p\2006\004\n\n\n\017?", '\0' } source = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 403311114}, sin_zero = "\000\000\000\000\000\000\000"} via = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} result = 0 responses = 1 x = 6 start_time = 1334116496 current_time = (gdb) continue Continuing. DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 8454682 (0x81021A) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.112 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Breakpoint 3, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbfd15fa0) at check_dhcp.c:910 910 new_offer->server_address=serv_ident.s_addr?serv_ident:source; (gdb) info locals x = option_type = 25200 option_length = 4 serv_ident = {s_addr = 0} (gdb) continue Continuing. Breakpoint 4, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbfd15fa0) at check_dhcp.c:917 917 if(verbose){ (gdb) info locals x = option_type = 25200 option_length = 4 serv_ident = {s_addr = 0} (gdb) continue Continuing. Added offer from server @ 10.10.10.24 of IP address 10.10.10.112 Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. Program exited normally. (gdb) quit tcpdump (saved the pcap also) root at nagios:/usr/local/src/nagios-plugins-1.4.15# tcpdump -nvvvxX -r check_dhcp.pcap reading from file check_dhcp.pcap, link-type EN10MB (Ethernet) 22:28:36.929010 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 576) 10.10.10.26.68 > 255.255.255.255.67: [bad udp cksum e6d!] BOOTP/DHCP, Request from 00:22:19:56:99:48, length 548, xid 0x6247da8b, secs 65280, Flags [Broadcast] (0x8000) Client-Ethernet-Address 00:22:19:56:99:48 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Discover END Option 255, length 0 PAD Option 0, length 0, occurs 304 0x0000: 4500 0240 0000 4000 4011 248a 0a0a 0a1a E.. at ..@. at .$..... 0x0010: ffff ffff 0044 0043 022c 1661 0101 0600 .....D.C.,.a.... 0x0020: 6247 da8b ff00 8000 0000 0000 0000 0000 bG.............. 0x0030: 0000 0000 0000 0000 0022 1956 9948 0000 .........".V.H.. 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0090: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0100: 0000 0000 0000 0000 6382 5363 3501 01ff ........c.Sc5... 0x0110: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0120: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0140: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0150: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0160: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0170: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0180: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0190: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0200: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0210: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0220: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0230: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 22:28:36.929258 IP (tos 0x0, ttl 128, id 22737, offset 0, flags [none], proto UDP (17), length 328) 10.10.10.15.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x6247da8b, Flags [none] (0x0000) Your-IP 10.10.10.112 Server-IP 10.10.10.24 Client-Ethernet-Address 00:22:19:56:99:48 file "kbox2000.0" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Subnet-Mask Option 1, length 4: 255.255.255.0 RN Option 58, length 4: 14400 RB Option 59, length 4: 25200 Lease-Time Option 51, length 4: 28800 Server-ID Option 54, length 4: 10.10.10.15 END Option 255, length 0 PAD Option 0, length 0, occurs 26 0x0000: 4500 0148 58d1 0000 8011 ccbb 0a0a 0a0f E..HX........... 0x0010: ffff ffff 0043 0044 0134 0e67 0201 0600 .....C.D.4.g.... 0x0020: 6247 da8b 0000 0000 0000 0000 0a0a 0a70 bG.............p 0x0030: 0a0a 0a18 0000 0000 0022 1956 9948 0000 .........".V.H.. 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0080: 0000 0000 0000 0000 6b62 6f78 3230 3030 ........kbox2000 0x0090: 2e30 0000 0000 0000 0000 0000 0000 0000 .0.............. 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0100: 0000 0000 0000 0000 6382 5363 3501 0201 ........c.Sc5... 0x0110: 04ff ffff 003a 0400 0038 403b 0400 0062 .....:...8@;...b 0x0120: 7033 0400 0070 8036 040a 0a0a 0fff 0000 p3...p.6........ 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0140: 0000 0000 0000 0000 ........ ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-04-10 15:17 Message: Hmm. As I said, I agree that the plugin's interpretation of the "siaddr" field is wrong. However, from reading the code, I wouldn't have expected the behavior you're reporting unless the "server identifier" option isn't set. So, I'd like to understand what's going on. Could you attach the dump of a DHCP session initiated by check_dhcp? ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 14:59 Message: In the tcpdump you can see the Server-ID (option 54) was set to 10.10.10.15 Server-ID Option 54, length 4: 10.10.10.15 0x36 (54) lenght 04 0a(10) 0a(10) 0a(10) 0f(15) 0x0120: 7033 0400 0070 8036 040a 0a0a 0f It appears to me that there is confusion of "Server Identifier" and "Server IP" that only comes up when one is using an siaddr. http://www.ietf.org/rfc/rfc2131.txt DHCP clarifies the interpretation of the 'siaddr' field as the address of the server to use in the next step of the client's bootstrap process. A DHCP server may return its own address in the 'siaddr' field, if the server is prepared to supply the next bootstrap service (e.g., delivery of an operating system executable image). A DHCP server always returns its own address in the 'server identifier' option. siaddr 4 IP address of next server to use in bootstrap; returned in DHCPOFFER, DHCPACK by server. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 13:47 Message: Server is a Windows 2003 DHCP server with next-server "siaddr" set for PXE boot. ---------------------------------------------------------------------- Comment By: Andy () Date: 2012-04-09 08:00 Message: I get the "wrong" response without the above change also. DHCP is Windows Server 2008 R1 (actually SBS). We have a PXE Boot server and the check_dhcp thinks the PXE Boot is the actual server, which fails. ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-03-14 10:31 Message: What sort of DHCP server are you running? The plugin will only use "siaddr" in this way if the mandatory "server identifier" option is missing from the server's response. It seems the current code tried to fix some problem which showed up in certain environments with DHCP relays involved. However, in principle I agree that the plugin's interpretation of the "siaddr" field isn't correct. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:27 Message: diff --git a/a/plugins-root/check_dhcp.c b/b/plugins-root/check_dhcp.c index 2a1875c..b7f695b 100644 --- a/a/plugins-root/check_dhcp.c +++ b/b/plugins-root/check_dhcp.c @@ -588,10 +588,11 @@ int get_dhcp_offer(int sock){ memcpy(&via,&source,sizeof(source)) ; /* If siaddr is non-zero, set "source" to siaddr */ +/* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } - +*/ if(verbose){ printf(_("DHCPOFFER from IP address %s"),inet_ntoa(source.sin_addr)); printf(_(" via %s\n"),inet_ntoa(via.sin_addr)); ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:03 Message: I verified that I can check remote DHCP servers correctly after applying the fix. Options used were "check_dhcp -u -s 10.10.10.15". ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:47 Message: Example of -s being specified correctly in verbose mode. Fails because siaddr (10.10.10.24) is copied over source (10.10.10.15). root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v -s 10.10.10.15 Requested server address: 10.10.10.15 DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 513242689 (0x1E977641) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 513242689 (0x1E977641) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 CRITICAL: Received 1 DHCPOFFER(s), 0 of 1 requested servers responded, max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:33 Message: The ticket contains the output of check_dhcp after I fixed it (oops). Sorry :( Jason Ellison Below is the output from an unmodified version of check_dhcp : root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 1292513780 (0x4D0A31F4) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 1292513780 (0x4D0A31F4) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:22 Message: was trying to use google login... Jason Ellison infotek at gmail.com ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 From noreply at sourceforge.net Fri Apr 13 07:30:38 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 12 Apr 2012 22:30:38 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3503921 ] check_dhcp.c incorrectly setting source ip address as siaddr Message-ID: Bugs item #3503921, was opened at 2012-03-13 16:16 Message generated for change (Comment added) made by infotek411 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: infotek at gmail.com () Assigned to: Nobody/Anonymous (nobody) Summary: check_dhcp.c incorrectly setting source ip address as siaddr Initial Comment: nagios-plugins-1.4.15 plugins-root/check_dhcp.c Sets dhcp server source ip to the next server (siaddr) IP address, causing -s to fail to operate as expected. -s, --serverip=IPADDRESS IP address of DHCP server that we must hear from root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 275057756 (0x10650C5C) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.15 via 10.10.10.15 DHCPOFFER XID: 275057756 (0x10650C5C) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.15 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. 17:58:55.805403 IP (tos 0x0, ttl 128, id 20477, offset 0, flags [none], proto UDP (17), length 328) 10.10.10.15.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x10650c5c, Flags [none] (0x0000) Your-IP 10.10.10.166 Server-IP 10.10.10.24 Client-Ethernet-Address 00:22:19:56:99:48 file "kbox2000.0" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Subnet-Mask Option 1, length 4: 255.255.255.0 RN Option 58, length 4: 14400 RB Option 59, length 4: 25200 Lease-Time Option 51, length 4: 28800 Server-ID Option 54, length 4: 10.10.10.15 0x0000: 4500 0148 4ffd 0000 8011 d58f 0a0a 0a0f 0x0010: ffff ffff 0043 0044 0134 2e43 0201 0600 0x0020: 1065 0c5c 0000 0000 0000 0000 0a0a 0aa6 0x0030: 0a0a 0a18 0000 0000 0022 1956 9948 0000 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 0x0080: 0000 0000 0000 0000 6b62 6f78 3230 3030 0x0090: 2e30 0000 0000 0000 0000 0000 0000 0000 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 0x0100: 0000 0000 0000 0000 6382 5363 3501 0201 0x0110: 04ff ffff 003a 0400 0038 403b 0400 0062 0x0120: 7033 0400 0070 8036 040a 0a0a 0fff 0000 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 0x0140: 0000 0000 0000 0000 plugins-root/check_dhcp.c FIX /* If siaddr is non-zero, set "source" to siaddr */ /* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } */ ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-12 22:30 Message: the following is a more correct in dealing with the 0x00 PAD octets... if value = 0 skip one octet else it was just an unknown value and you can skip option_length. @@ -870,9 +865,9 @@ memcpy(&serv_ident.s_addr, &offer_packet->options[x],sizeof(serv_ident.s_addr)); break; } - - /* skip option data we're ignoring */ - if(option_type!=DHCP_OPTION_REBINDING_TIME) + if(option_type=0) + x+=1; + else x+=option_length; } ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-12 21:07 Message: That did solve the abort issue when parsing the options, which in turn allowed serv_ident to be set. It brought out a bug in the OPTION parsing in the switch while in verbose mode I also got rid of the source = siaddr. --- ./a/plugins-root/check_dhcp.c 2010-07-27 15:47:16.000000000 -0500 +++ ./b/plugins-root/check_dhcp.c 2012-04-12 22:58:56.000000000 -0500 @@ -141,7 +141,7 @@ u_int16_t flags; /* flags */ struct in_addr ciaddr; /* IP address of this machine (if we already have one) */ struct in_addr yiaddr; /* IP address of this machine (offered by the DHCP server) */ - struct in_addr siaddr; /* IP address of DHCP server */ + struct in_addr siaddr; /* IP address of next server */ struct in_addr giaddr; /* IP address of DHCP relay */ unsigned char chaddr [MAX_DHCP_CHADDR_LENGTH]; /* hardware address of this machine */ char sname [MAX_DHCP_SNAME_LENGTH]; /* name of DHCP server */ @@ -587,11 +587,6 @@ /* Save a copy of "source" into "via" even if it's via itself */ memcpy(&via,&source,sizeof(source)) ; - /* If siaddr is non-zero, set "source" to siaddr */ - if(offer_packet.siaddr.s_addr != 0L){ - source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; - } - if(verbose){ printf(_("DHCPOFFER from IP address %s"),inet_ntoa(source.sin_addr)); printf(_(" via %s\n"),inet_ntoa(via.sin_addr)); @@ -840,7 +835,7 @@ for(x=4;xoptions[x]==-1 || (int)offer_packet->options[x]==0) + if((int)offer_packet->options[x]==-1) break; /* get option type */ @@ -870,10 +865,7 @@ memcpy(&serv_ident.s_addr, &offer_packet->options[x],sizeof(serv_ident.s_addr)); break; } - - /* skip option data we're ignoring */ - if(option_type!=DHCP_OPTION_REBINDING_TIME) - x+=option_length; + x+=option_length; } if(verbose){ @@ -903,9 +895,9 @@ * the next bootstrap service (e.g., delivery of an operating system * executable image). A DHCP server always returns its own address in * the 'server identifier' option." 'serv_ident' is the 'server - * identifier' option, 'source' is the 'siaddr' field or (if 'siaddr' - * wasn't available) the IP address we received the DHCPOFFER from. If - * 'serv_ident' isn't available for some reason, we use 'source'. + * identifier' option, 'source' is the IP address we received the + * DHCPOFFER from. If 'serv_ident' isn't available for some reason, we + * use 'source'. */ new_offer->server_address=serv_ident.s_addr?serv_ident:source; new_offer->offered_address=offer_packet->yiaddr; ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-04-11 11:04 Message: Thank you very much. I've attached a patch, could you check whether it solves the problem? ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 21:02 Message: gdb inspecting the local variables before it is source is clobbered by siaddr Breakpoint 1, get_dhcp_offer (sock=6) at check_dhcp.c:591 591 if(offer_packet.siaddr.s_addr != 0L){ after source is clobbered by siaddr Breakpoint 2, get_dhcp_offer (sock=6) at check_dhcp.c:595 595 if(verbose){ and before and after the conditional expression that sets source Breakpoint 3, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbf9d7460) at check_dhcp.c:910 910 new_offer->server_address=serv_ident.s_addr?serv_ident:source; Breakpoint 4, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbf9d7460) at check_dhcp.c:917 917 if(verbose){ # gdb ./plugins-root/check_dhcp GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-slackware-linux"... (gdb) set args -v (gdb) break 590 Breakpoint 1 at 0x804a808: file check_dhcp.c, line 590. (gdb) break 595 Breakpoint 2 at 0x804a815: file check_dhcp.c, line 595. (gdb) break 910 Breakpoint 3 at 0x8049e56: file check_dhcp.c, line 910. (gdb) break 917 Breakpoint 4 at 0x8049e83: file check_dhcp.c, line 917. (gdb) start Breakpoint 5 at 0x804aeb8: file check_dhcp.c, line 262. Starting program: /usr/local/src/nagios-plugins-1.4.15/plugins-root/check_dhcp -v [Thread debugging using libthread_db enabled] [New Thread 0xb7e466c0 (LWP 21323)] [Switching to Thread 0xb7e466c0 (LWP 21323)] main (argc=2, argv=0xbfd162c4) at check_dhcp.c:262 262 setlocale (LC_ALL, ""); (gdb) continue Continuing. DHCP socket: 6 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 8454682 (0x81021A) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK Breakpoint 1, get_dhcp_offer (sock=6) at check_dhcp.c:591 591 if(offer_packet.siaddr.s_addr != 0L){ (gdb) info locals offer_packet = {op = 2 '\002', htype = 1 '\001', hlen = 6 '\006', hops = 0 '\0', xid = 436371712, secs = 0, flags = 0, ciaddr = {s_addr = 0}, yiaddr = {s_addr = 1879706122}, siaddr = {s_addr = 403311114}, giaddr = {s_addr = 0}, chaddr = "\000\"\031V\231H\000\000\000\000\000\000\000\000\000", sname = '\0' , file = "kbox2000.0", '\0' , options = "c\202Sc5\001\002\001\004???\000:\004\000\0008@;\004\000\000bp3\004\000\000p\2006\004\n\n\n\017?", '\0' } source = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} via = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} result = 0 responses = 1 x = 6 start_time = 1334116496 current_time = (gdb) continue Continuing. Breakpoint 2, get_dhcp_offer (sock=6) at check_dhcp.c:595 595 if(verbose){ (gdb) info locals offer_packet = {op = 2 '\002', htype = 1 '\001', hlen = 6 '\006', hops = 0 '\0', xid = 436371712, secs = 0, flags = 0, ciaddr = {s_addr = 0}, yiaddr = {s_addr = 1879706122}, siaddr = {s_addr = 403311114}, giaddr = {s_addr = 0}, chaddr = "\000\"\031V\231H\000\000\000\000\000\000\000\000\000", sname = '\0' , file = "kbox2000.0", '\0' , options = "c\202Sc5\001\002\001\004???\000:\004\000\0008@;\004\000\000bp3\004\000\000p\2006\004\n\n\n\017?", '\0' } source = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 403311114}, sin_zero = "\000\000\000\000\000\000\000"} via = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} result = 0 responses = 1 x = 6 start_time = 1334116496 current_time = (gdb) continue Continuing. DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 8454682 (0x81021A) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.112 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Breakpoint 3, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbfd15fa0) at check_dhcp.c:910 910 new_offer->server_address=serv_ident.s_addr?serv_ident:source; (gdb) info locals x = option_type = 25200 option_length = 4 serv_ident = {s_addr = 0} (gdb) continue Continuing. Breakpoint 4, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbfd15fa0) at check_dhcp.c:917 917 if(verbose){ (gdb) info locals x = option_type = 25200 option_length = 4 serv_ident = {s_addr = 0} (gdb) continue Continuing. Added offer from server @ 10.10.10.24 of IP address 10.10.10.112 Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. Program exited normally. (gdb) quit tcpdump (saved the pcap also) root at nagios:/usr/local/src/nagios-plugins-1.4.15# tcpdump -nvvvxX -r check_dhcp.pcap reading from file check_dhcp.pcap, link-type EN10MB (Ethernet) 22:28:36.929010 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 576) 10.10.10.26.68 > 255.255.255.255.67: [bad udp cksum e6d!] BOOTP/DHCP, Request from 00:22:19:56:99:48, length 548, xid 0x6247da8b, secs 65280, Flags [Broadcast] (0x8000) Client-Ethernet-Address 00:22:19:56:99:48 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Discover END Option 255, length 0 PAD Option 0, length 0, occurs 304 0x0000: 4500 0240 0000 4000 4011 248a 0a0a 0a1a E.. at ..@. at .$..... 0x0010: ffff ffff 0044 0043 022c 1661 0101 0600 .....D.C.,.a.... 0x0020: 6247 da8b ff00 8000 0000 0000 0000 0000 bG.............. 0x0030: 0000 0000 0000 0000 0022 1956 9948 0000 .........".V.H.. 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0090: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0100: 0000 0000 0000 0000 6382 5363 3501 01ff ........c.Sc5... 0x0110: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0120: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0140: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0150: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0160: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0170: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0180: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0190: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0200: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0210: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0220: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0230: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 22:28:36.929258 IP (tos 0x0, ttl 128, id 22737, offset 0, flags [none], proto UDP (17), length 328) 10.10.10.15.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x6247da8b, Flags [none] (0x0000) Your-IP 10.10.10.112 Server-IP 10.10.10.24 Client-Ethernet-Address 00:22:19:56:99:48 file "kbox2000.0" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Subnet-Mask Option 1, length 4: 255.255.255.0 RN Option 58, length 4: 14400 RB Option 59, length 4: 25200 Lease-Time Option 51, length 4: 28800 Server-ID Option 54, length 4: 10.10.10.15 END Option 255, length 0 PAD Option 0, length 0, occurs 26 0x0000: 4500 0148 58d1 0000 8011 ccbb 0a0a 0a0f E..HX........... 0x0010: ffff ffff 0043 0044 0134 0e67 0201 0600 .....C.D.4.g.... 0x0020: 6247 da8b 0000 0000 0000 0000 0a0a 0a70 bG.............p 0x0030: 0a0a 0a18 0000 0000 0022 1956 9948 0000 .........".V.H.. 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0080: 0000 0000 0000 0000 6b62 6f78 3230 3030 ........kbox2000 0x0090: 2e30 0000 0000 0000 0000 0000 0000 0000 .0.............. 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0100: 0000 0000 0000 0000 6382 5363 3501 0201 ........c.Sc5... 0x0110: 04ff ffff 003a 0400 0038 403b 0400 0062 .....:...8@;...b 0x0120: 7033 0400 0070 8036 040a 0a0a 0fff 0000 p3...p.6........ 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0140: 0000 0000 0000 0000 ........ ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-04-10 15:17 Message: Hmm. As I said, I agree that the plugin's interpretation of the "siaddr" field is wrong. However, from reading the code, I wouldn't have expected the behavior you're reporting unless the "server identifier" option isn't set. So, I'd like to understand what's going on. Could you attach the dump of a DHCP session initiated by check_dhcp? ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 14:59 Message: In the tcpdump you can see the Server-ID (option 54) was set to 10.10.10.15 Server-ID Option 54, length 4: 10.10.10.15 0x36 (54) lenght 04 0a(10) 0a(10) 0a(10) 0f(15) 0x0120: 7033 0400 0070 8036 040a 0a0a 0f It appears to me that there is confusion of "Server Identifier" and "Server IP" that only comes up when one is using an siaddr. http://www.ietf.org/rfc/rfc2131.txt DHCP clarifies the interpretation of the 'siaddr' field as the address of the server to use in the next step of the client's bootstrap process. A DHCP server may return its own address in the 'siaddr' field, if the server is prepared to supply the next bootstrap service (e.g., delivery of an operating system executable image). A DHCP server always returns its own address in the 'server identifier' option. siaddr 4 IP address of next server to use in bootstrap; returned in DHCPOFFER, DHCPACK by server. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 13:47 Message: Server is a Windows 2003 DHCP server with next-server "siaddr" set for PXE boot. ---------------------------------------------------------------------- Comment By: Andy () Date: 2012-04-09 08:00 Message: I get the "wrong" response without the above change also. DHCP is Windows Server 2008 R1 (actually SBS). We have a PXE Boot server and the check_dhcp thinks the PXE Boot is the actual server, which fails. ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-03-14 10:31 Message: What sort of DHCP server are you running? The plugin will only use "siaddr" in this way if the mandatory "server identifier" option is missing from the server's response. It seems the current code tried to fix some problem which showed up in certain environments with DHCP relays involved. However, in principle I agree that the plugin's interpretation of the "siaddr" field isn't correct. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:27 Message: diff --git a/a/plugins-root/check_dhcp.c b/b/plugins-root/check_dhcp.c index 2a1875c..b7f695b 100644 --- a/a/plugins-root/check_dhcp.c +++ b/b/plugins-root/check_dhcp.c @@ -588,10 +588,11 @@ int get_dhcp_offer(int sock){ memcpy(&via,&source,sizeof(source)) ; /* If siaddr is non-zero, set "source" to siaddr */ +/* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } - +*/ if(verbose){ printf(_("DHCPOFFER from IP address %s"),inet_ntoa(source.sin_addr)); printf(_(" via %s\n"),inet_ntoa(via.sin_addr)); ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:03 Message: I verified that I can check remote DHCP servers correctly after applying the fix. Options used were "check_dhcp -u -s 10.10.10.15". ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:47 Message: Example of -s being specified correctly in verbose mode. Fails because siaddr (10.10.10.24) is copied over source (10.10.10.15). root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v -s 10.10.10.15 Requested server address: 10.10.10.15 DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 513242689 (0x1E977641) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 513242689 (0x1E977641) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 CRITICAL: Received 1 DHCPOFFER(s), 0 of 1 requested servers responded, max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:33 Message: The ticket contains the output of check_dhcp after I fixed it (oops). Sorry :( Jason Ellison Below is the output from an unmodified version of check_dhcp : root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 1292513780 (0x4D0A31F4) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 1292513780 (0x4D0A31F4) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:22 Message: was trying to use google login... Jason Ellison infotek at gmail.com ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 From noreply at sourceforge.net Mon Apr 16 21:32:29 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 16 Apr 2012 12:32:29 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Feature Requests-3518544 ] check_by_ssh -H hostname:port Message-ID: Feature Requests item #3518544, was opened at 2012-04-16 12:32 Message generated for change (Tracker Item Submitted) made by beneford You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397600&aid=3518544&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Priority: 5 Private: No Submitted By: beneford (beneford) Assigned to: Nobody/Anonymous (nobody) Summary: check_by_ssh -H hostname:port Initial Comment: It would be really useful to allow: check_by_ssh -H hostname:port rather than having to specify hostname and port in separate parameters check_by_ssh -H hostname -p port The code changes are minimal and can be localised to the process_arguments case statement check_by_ssh.c line 225: [begin] case 'H': /* host */ if (p1=strstr(optarg,":")) *p1=0; // terminate the host-name host_or_die(optarg); hostname = optarg; if (!p1) break; optarg=p1+1; // Set port number as next param and // fall through to process the port... case 'p': /* port number */ [end] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397600&aid=3518544&group_id=29880 From mithun.gaikwad at gmail.com Tue Apr 17 06:22:01 2012 From: mithun.gaikwad at gmail.com (Mithun Gaikwad) Date: Tue, 17 Apr 2012 09:52:01 +0530 Subject: [Nagiosplug-devel] Required improvements in check_disk In-Reply-To: References: Message-ID: Hi Team, Is it possible to have check the disk is Read-Only or Red-Write. In below case, I cannot monitor the disk is in writable mode or not with check_disk and I want to single check for all this errors. *e.g. :* [root at localhost libexec]# ./check_disk -w 20% -c 5% -p /svn DISK OK - free space: /svn 95166 MB (99% inode=99%);| /svn=506MB;80634;95753;0;100793 [root at localhost libexec]# touch /svn/testfile touch: cannot touch `/svn/testfile': Read-only file system [root at localhost libexec]# mount |grep /svn /dev/mapper/VolGroup01-svn on /svn type ext3 (rw) So, error can be - CRITICAL:Disk /svn is mounted but unable to write on the disk. Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at sourceforge.net Tue Apr 17 08:06:29 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 16 Apr 2012 23:06:29 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3518671 ] check_icmp throws an error on "Address unreachable" Message-ID: Bugs item #3518671, was opened at 2012-04-16 23:06 Message generated for change (Tracker Item Submitted) made by bschmidt You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3518671&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Bernhard Schmidt (bschmidt) Assigned to: Nobody/Anonymous (nobody) Summary: check_icmp throws an error on "Address unreachable" Initial Comment: $ ,/check_ping -H isatap-g.srv.lrz.de -w '200,10%' -c '400,50%' -6 -p 5 --verbose --verbose --verbose --verbose CMD: /bin/ping6 -n -U -w 10 -c 5 isatap-g.srv.lrz.de Output: PING isatap-g.srv.lrz.de(2001:4ca0:0:107::a9c:ca0b) 56 data bytes Output: Output: --- isatap-g.srv.lrz.de ping statistics --- Output: 10 packets transmitted, 0 received, 100% packet loss, time 9057ms Output: PING CRITICAL - Packet loss = 100%|rta=400.000000ms;200.000000;400.000000;0.000000 pl=100%;10;50;0 200.000000:10% 400.000000:50% $ ./check_ping -H isatap-g.srv.lrz.de -w '200,10%' -c '400,50%' -6 -p 5 --verbose --verbose --verbose --verbose CMD: /bin/ping6 -n -U -w 10 -c 5 isatap-g.srv.lrz.de Output: PING isatap-g.srv.lrz.de(2001:4ca0:0:107::a9c:ca0b) 56 data bytes Output: From 2001:4ca0:0:55::5 icmp_seq=1 Destination unreachable: Address unreachable Output: Output: --- isatap-g.srv.lrz.de ping statistics --- Output: 4 packets transmitted, 0 received, +1 errors, 100% packet loss, time 3000ms Output: /bin/ping6 -n -U -w 10 -c 5 isatap-g.srv.lrz.de CRITICAL - Could not interpret output from ping command ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3518671&group_id=29880 From noreply at sourceforge.net Tue Apr 17 08:55:13 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 16 Apr 2012 23:55:13 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3518671 ] check_icmp throws an error on "Address unreachable" Message-ID: Bugs item #3518671, was opened at 2012-04-16 23:06 Message generated for change (Comment added) made by bschmidt You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3518671&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Bernhard Schmidt (bschmidt) Assigned to: Nobody/Anonymous (nobody) Summary: check_icmp throws an error on "Address unreachable" Initial Comment: $ ,/check_ping -H isatap-g.srv.lrz.de -w '200,10%' -c '400,50%' -6 -p 5 --verbose --verbose --verbose --verbose CMD: /bin/ping6 -n -U -w 10 -c 5 isatap-g.srv.lrz.de Output: PING isatap-g.srv.lrz.de(2001:4ca0:0:107::a9c:ca0b) 56 data bytes Output: Output: --- isatap-g.srv.lrz.de ping statistics --- Output: 10 packets transmitted, 0 received, 100% packet loss, time 9057ms Output: PING CRITICAL - Packet loss = 100%|rta=400.000000ms;200.000000;400.000000;0.000000 pl=100%;10;50;0 200.000000:10% 400.000000:50% $ ./check_ping -H isatap-g.srv.lrz.de -w '200,10%' -c '400,50%' -6 -p 5 --verbose --verbose --verbose --verbose CMD: /bin/ping6 -n -U -w 10 -c 5 isatap-g.srv.lrz.de Output: PING isatap-g.srv.lrz.de(2001:4ca0:0:107::a9c:ca0b) 56 data bytes Output: From 2001:4ca0:0:55::5 icmp_seq=1 Destination unreachable: Address unreachable Output: Output: --- isatap-g.srv.lrz.de ping statistics --- Output: 4 packets transmitted, 0 received, +1 errors, 100% packet loss, time 3000ms Output: /bin/ping6 -n -U -w 10 -c 5 isatap-g.srv.lrz.de CRITICAL - Could not interpret output from ping command ---------------------------------------------------------------------- >Comment By: Bernhard Schmidt (bschmidt) Date: 2012-04-16 23:55 Message: Fixed in https://github.com/bernhardschmidt/nagios-plugins/commit/ff098243ab9e41696f91df99135d80546cefecbc, I sent a pull request. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3518671&group_id=29880 From holger at CIS.FU-Berlin.DE Tue Apr 17 09:27:40 2012 From: holger at CIS.FU-Berlin.DE (Holger =?iso-8859-1?Q?Wei=DF?=) Date: Tue, 17 Apr 2012 09:27:40 +0200 Subject: [Nagiosplug-devel] Required improvements in check_disk In-Reply-To: References: Message-ID: <20120417072740.GC2496542@CIS.FU-Berlin.DE> * Mithun Gaikwad [2012-04-17 09:52]: > Is it possible to have check the disk is Read-Only or Red-Write. check_disk is really just about the fill level. I'd use a separate plugin for testing other aspects of the file system. The following script should do the trick: # ----------------------------------------------------------------- #!/bin/sh if [ $# != 1 ] then echo "UNKNOWN: Usage: $0 " exit 3 fi directory=$1 tmpfile="$directory/.${0##*/}.XXXXXX" output=`mktemp "$tmpfile" 2>&1` status=$? trap 'rm -f "$tmpfile"' EXIT if [ $status -eq 0 ] then echo "OK: $directory is writable" exit 0 else echo "CRITICAL: Cannot write to $directory: ${output##*: }" exit 2 fi # ----------------------------------------------------------------- Holger From reply+i-4148006-352f4cf4da31b79a25a33127c70d43081d25474e-71850 at reply.github.com Tue Apr 17 11:58:10 2012 From: reply+i-4148006-352f4cf4da31b79a25a33127c70d43081d25474e-71850 at reply.github.com (Bernhard Schmidt) Date: Tue, 17 Apr 2012 11:58:10 +0200 Subject: [Nagiosplug-devel] [nagios-plugins] check_ping: Parse ICMPv6 "Address unreachable" (#1) Message-ID: <20120417095810.GD2496542@CIS.FU-Berlin.DE> In ICMPv6 "Host unreachable" has been renamed to "Address unreachable" (see RFC4443 3.1). Handle ping6 returning "Address unreachable" and map it to the "Host unreachable" plugin output. Fixes SF#3518671 You can merge this Pull Request by running: git pull https://github.com/bernhardschmidt/nagios-plugins master Or you can view, comment on it, or merge it online at: https://github.com/nagios-plugins/nagios-plugins/pull/1 -- Commit Summary -- * check_ping: Treat ICMPv6 "Address unreachable" as "Host unreachable" -- File Changes -- M plugins/check_ping.c (4) -- Patch Links -- https://github.com/nagios-plugins/nagios-plugins/pull/1.patch https://github.com/nagios-plugins/nagios-plugins/pull/1.diff --- Reply to this email directly or view it on GitHub: https://github.com/nagios-plugins/nagios-plugins/pull/1 From reply+i-4149975-561f8952896454b4810862b3f3090850ef38f652-71850 at reply.github.com Tue Apr 17 11:58:31 2012 From: reply+i-4149975-561f8952896454b4810862b3f3090850ef38f652-71850 at reply.github.com (waja) Date: Tue, 17 Apr 2012 11:58:31 +0200 Subject: [Nagiosplug-devel] [nagios-plugins] Possible Fix for Debian #662638 (#2) Message-ID: <20120417095831.GE2496542@CIS.FU-Berlin.DE> please review ;) You can merge this Pull Request by running: git pull https://github.com/waja/nagios-plugins master Or you can view, comment on it, or merge it online at: https://github.com/nagios-plugins/nagios-plugins/pull/2 -- Commit Summary -- * Fix check_ping where output of ping6 when unreachable (Debian #662638) -- File Changes -- M NEWS (3) M plugins/check_ping.c (2) -- Patch Links -- https://github.com/nagios-plugins/nagios-plugins/pull/2.patch https://github.com/nagios-plugins/nagios-plugins/pull/2.diff --- Reply to this email directly or view it on GitHub: https://github.com/nagios-plugins/nagios-plugins/pull/2 From holger at CIS.FU-Berlin.DE Tue Apr 17 15:41:31 2012 From: holger at CIS.FU-Berlin.DE (Holger =?iso-8859-1?Q?Wei=DF?=) Date: Tue, 17 Apr 2012 15:41:31 +0200 Subject: [Nagiosplug-devel] [HEADS UP] Repositories moved to Github Message-ID: <20120417134131.GF2496542@CIS.FU-Berlin.DE> As nobody seemed to object?, I moved our repositories to Github: https://github.com/nagios-plugins Contributors are now encouraged to send pull requests via Github? instead of using the "Patches" tracker on SourceForge. Please also feel free to create pull requests for unhandled patches you sent to the SourceForge tracker (but don't forget to mention the SourceForge tracker item ID in the pull request). Team members with push access will have to update their local clones of the repositories. Assuming you cloned the "nagiosplug" repository and the remote repository is referenced by the name "origin" (which it is by default), you could use the following command to update the URL: $ git remote set-url origin git at github.com:nagios-plugins/nagios-plugins.git Anyone else can continue to track the SourceForge repositories, as they now mirror the Github repositories. We're looking forward to your pull requests :-) Holger ? See: http://thread.gmane.org/gmane.network.nagios.plugins.devel/7570 ? See: http://help.github.com/send-pull-requests/ From reply+i-4160733-f3398c83b13b2a4b73d4079fa5eaede5570905a2-71850 at reply.github.com Wed Apr 18 19:55:11 2012 From: reply+i-4160733-f3398c83b13b2a4b73d4079fa5eaede5570905a2-71850 at reply.github.com (Marc Remy) Date: Wed, 18 Apr 2012 19:55:11 +0200 Subject: [Nagiosplug-devel] [nagios-plugins] check_users: improve performance (#3) Message-ID: <20120418175511.GG2496542@CIS.FU-Berlin.DE> This patch use the utxent function family to collect the user data. It improve the check speed. Need a system conforming to POSIX.1-2001. Tested only on Debian Squeeze x86_64. Already sent: ID: 3373486 http://sourceforge.net/tracker/?func=detail&atid=397599&aid=3373486&group_id=29880 You can merge this Pull Request by running: git pull https://github.com/mremy/nagios-plugins check_users-use-utxent-functions Or you can view, comment on it, or merge it online at: https://github.com/nagios-plugins/nagios-plugins/pull/3 -- Commit Summary -- * check_users: improve performance -- File Changes -- M plugins/Makefile.am (2) M plugins/check_users.c (38) -- Patch Links -- https://github.com/nagios-plugins/nagios-plugins/pull/3.patch https://github.com/nagios-plugins/nagios-plugins/pull/3.diff --- Reply to this email directly or view it on GitHub: https://github.com/nagios-plugins/nagios-plugins/pull/3 From reply+i-4176218-ae5237155f5db8117512c30807a450a0b489f8cb-71850 at reply.github.com Wed Apr 18 19:55:26 2012 From: reply+i-4176218-ae5237155f5db8117512c30807a450a0b489f8cb-71850 at reply.github.com (Alex Griffin) Date: Wed, 18 Apr 2012 19:55:26 +0200 Subject: [Nagiosplug-devel] [nagios-plugins] check_range function in utils.sh (#4) Message-ID: <20120418175526.GH2496542@CIS.FU-Berlin.DE> Shell plugins should be able to work with standard nagios plugin ranges, but this is really tedious to do in shell scripts so nobody does. I've written a comprehensive shell function that mirrors the check_range C function from utils_base.c (except that it also parses the range string so it has an extra return path for bad input) and I think it should be included by default. You can merge this Pull Request by running: git pull https://github.com/laziac/nagios-plugins master Or you can view, comment on it, or merge it online at: https://github.com/nagios-plugins/nagios-plugins/pull/4 -- Commit Summary -- * Added check_range shell function to utils.sh.in -- File Changes -- M plugins-scripts/utils.sh.in (85) -- Patch Links -- https://github.com/nagios-plugins/nagios-plugins/pull/4.patch https://github.com/nagios-plugins/nagios-plugins/pull/4.diff --- Reply to this email directly or view it on GitHub: https://github.com/nagios-plugins/nagios-plugins/pull/4 From noreply at sourceforge.net Fri Apr 20 16:48:27 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Fri, 20 Apr 2012 07:48:27 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3519847 ] check_dig thinks that :: is not :0: Message-ID: Bugs item #3519847, was opened at 2012-04-20 07:48 Message generated for change (Tracker Item Submitted) made by zugschlus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3519847&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Interface (example) Group: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Marc Haber (zugschlus) Assigned to: Nobody/Anonymous (nobody) Summary: check_dig thinks that :: is not :0: Initial Comment: check_dig does not handle IPv6 addresses with the intelligence that it needs. For example: /usr/lib/nagios/plugins/check_dig --hostname 127.0.0.1 --query_address=guanabara.rederio.br --record_type=AAAA --expected_address=2001:12f0:4c2::222:19ff:febd:98c2 --verbose /usr/bin/dig @127.0.0.1 -p 53 guanabara.rederio.br -t AAAA Looking for: '2001:12f0:4c2::222:19ff:febd:98c2' ;; ANSWER SECTION: guanabara.rederio.br. 86400 IN AAAA 2001:12f0:4c2:0:222:19ff:febd:98c2 ;; AUTHORITY SECTION: rederio.br. 86400 IN NS rio.rederio.br. rederio.br. 86400 IN NS guanabara.rederio.br. ;; ADDITIONAL SECTION: rio.rederio.br. 86400 IN A 200.20.94.51 guanabara.rederio.br. 86400 IN A 200.20.94.50 ;; Query time: 510 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Apr 19 00:06:03 2012 ;; MSG SIZE rcvd: 130 DNS WARNING - 0.524 seconds response time (Server not found in ANSWER +SECTION)|time=0.523813s;;;0.000000 note 19ff::febd on the command line (which is the output given, for example, by the ruby Resolv library) and 19ff:0:febd in the output given by dig. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3519847&group_id=29880 From tseveendorj at gmail.com Mon Apr 23 05:15:51 2012 From: tseveendorj at gmail.com (Tseveendorj Ochirlantuu) Date: Mon, 23 Apr 2012 11:15:51 +0800 Subject: [Nagiosplug-devel] --url option of check_real plugin Message-ID: Hello, I don't know how to write --url 's value on check_real. I mean /var/www/ or http://example.com/live/stream what does this url option do ? Sincerely, -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.schoeller at Colorado.EDU Fri Apr 27 07:58:32 2012 From: eric.schoeller at Colorado.EDU (Eric Schoeller) Date: Thu, 26 Apr 2012 23:58:32 -0600 Subject: [Nagiosplug-devel] completely override shortname Message-ID: <4F9A3588.4060604@colorado.edu> hi, I saw this mentioned on a list (I thought this one) recently, but I can't seem to find the message. We're using the nagios-plugin perl module and I have a need to override the default "SHORTNAME OK -" plugin output to just "OK -". Setting shortname to "" during Plugin->new doesn't work, and setting shortname to " " leaves a space in from the the service state in the output. How do I remove shortname altogether without modifying Plugin.pm? Thanks, Eric