Commit graph

91 commits

Author SHA1 Message Date
Holger Weiss
4d52762732 check_dhcp: Don't misinterpret the "siaddr" field
RFC 2131 (2.) says: "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."  So, we shouldn't interpret this field as
the DHCP server's own address.  (#3503921 - Jason Ellison)
2012-06-14 00:39:55 +02:00
Holger Weiss
f091d59e0f check_dhcp: Fix handling of "pad" options
Don't let "pad" options[*] terminate the parsing of DHCP options.  This
bug was triggered by using check_dhcp against Windows 2003 DHCP servers
(see #3503921).

[*] Cf. RFC 2132, 3.1.
2012-06-13 12:36:42 +02:00
Sebastian Harl
5ebe25fc24 check_host: Allocate a large-enough buffer for the host table.
When specifying a host-name on the command line, each of its IPs is added to
the host table (and each one is pinged). So, the buffer has to be large enough
to hold all of the respective host objects. (argc - 1) only fits hosts with a
single IP.

Thanks to Max Kosmach <max@tcen.ru> for reporting this in Debian bug #623702.
2011-04-28 20:42:53 -04:00
Thomas Guyot-Sionnest
eaf3cb27f4 Add newline after "Usage:" in --help 2010-04-22 08:57:14 -04:00
Thomas Guyot-Sionnest
884aee0667 Standardize the extra-opts notes 2010-04-21 23:29:18 -04:00
Thomas Guyot-Sionnest
25d1ee331d Fix translations when extra-opts aren't enabled
Bug #2832884 reported problem with translations outputting pot file
headers. This is caused by "" matching the header of the translation
files.

This patch moves gettext macros inside utils macros and update some
french translations.
2010-04-14 08:33:06 -04:00
Thomas Guyot-Sionnest
c326b4dc1d pst3.c must not use nagiosplug/gnulib includes 2010-04-14 03:02:38 -04:00
Thomas Guyot-Sionnest
9c1aa029c0 Set proper network byte order for icmp_id and icmp_seq in icmp packets 2009-10-15 22:12:32 -04:00
Thomas Guyot-Sionnest
c2d9c59dc9 Increment per-host sequence in check_icmp 2009-10-15 21:52:18 -04:00
nagiosplugins
43c187a944 Allow custom versions with the release file... 2009-09-25 09:31:04 +00:00
Ton Voon
bbadda8979 Ensure dirhandle is closed (Duncan Ferguson) 2009-09-14 11:22:13 +01:00
Ton Voon
0dcd5e677e pst3 compile with Sun Studio Compiler 2009-07-14 23:20:21 +01:00
Matthias Eble
5f67308451 Fixed error in rtt/rta calculation in case of system clock problems
Time differences are now set to 0 in case of backward timejumps so there are no wrap-around problems any more.
The RTA calculation hopefully gets a more accurate value in these cases also.
2009-06-14 23:31:29 +02:00
Holger Weiss
bc827c9083 Don't use the plain char type for data buffers
Buffers which are used for holding arbitrary data should be referenced
using pointers to void and accessed using pointers to unsigned char.

Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
2009-06-02 01:09:18 +02:00
Matthias Eble
0a5cd15e75 Fixed check_icmp compiler warnings by including float.h
Self defined DBL_MAX caused compiler warnings. Now float.h
which defines DBL_MAX is included.
2009-06-01 22:41:46 +02:00
Matthias Eble
1c55e7287a Fixed --help output for warn and critical thresholds (sf.net #2796624, debian #530553)
check_icmp wrongly calculated the current thresholds in --help output.
2009-06-01 22:21:59 +02:00
Thomas Guyot-Sionnest
399f0770b2 Fixing build breakages (I totally forgot this rule was there...) 2008-11-26 21:29:40 -05:00
Thomas Guyot-Sionnest
9bcfa9cded Disable dynamic versionning for releases, and allow generating version out of subversion.
This should be a definitive fix for systems with non-compilant make programs as the version will be taken from $(PACKAGE_VERSION) instead.

At the same time I added code for generating svn-based version strings.
2008-11-26 05:42:48 -05:00
Thomas Guyot-Sionnest
ed9a088b37 Workaround to support more make programs
Avoid the use of "-include". Since "include" is interpreted by Automake, we have to use a special macro instead.
2008-11-25 08:50:35 -05:00
Thomas Guyot-Sionnest
c0a75482b4 Avoid the use of .PHONY (target s created twice and I have no idea if it's right). 2008-11-23 13:34:19 -05:00
Thomas Guyot-Sionnest
6fbd14fea5 Removing CVS/SVN tags and replacing with git-based versioning
For contrib/, full tags have been imported from subversion


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-23 05:38:47 +00:00
Thomas Guyot-Sionnest
caa8bd6423 Bulk EOL cleanup
$ git diff --ignore-space-change|diffstat
 0 files changed


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2087 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-19 06:45:18 +00:00
Thomas Guyot-Sionnest
526c3ad7a7 check_icmp now reports min and max round trip time perfdata (Steve Rader)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2073 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-07 01:41:17 +00:00
Ton Voon
47b45d4981 Close on fd
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2031 f882894a-f735-0410-b71e-b25c423dba1c
2008-08-08 16:12:00 +00:00
Thomas Guyot-Sionnest
2367f82090 Typo in --help output
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2029 f882894a-f735-0410-b71e-b25c423dba1c
2008-08-08 02:08:08 +00:00
Matthias Eble
3c38fc752e -b option now specifies ICMP data bytes instead of packet size
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2027 f882894a-f735-0410-b71e-b25c423dba1c
2008-07-28 20:15:52 +00:00
Matthias Eble
c64070fd3f Add support for packet size modification (-b)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2026 f882894a-f735-0410-b71e-b25c423dba1c
2008-07-17 07:06:33 +00:00
Holger Weiss
830f3cc38a Don't try to set the "SO_BROADCAST" socket option for unicast requests.
(Also, removed the unused "DHCP_UNICAST_FLAG" macro.)


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2018 f882894a-f735-0410-b71e-b25c423dba1c
2008-07-06 12:57:11 +00:00
Ton Voon
25f0e9f4f0 Change pst3 again, this time to remove use of kvm which is not
available in Solaris 10 non-global zones. Uses /proc, which is not
available in older versions of Solaris.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2016 f882894a-f735-0410-b71e-b25c423dba1c
2008-07-02 20:00:08 +00:00
Ton Voon
2968a166e2 Fixed possible coredump. Removed one level of subroutines (Duncan Ferguson)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2012 f882894a-f735-0410-b71e-b25c423dba1c
2008-06-17 14:19:17 +00:00
Ton Voon
5c3d4aea27 Optimised pst3 for systems with large number of processes (Duncan Ferguson)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2010 f882894a-f735-0410-b71e-b25c423dba1c
2008-06-02 16:22:35 +00:00
Ton Voon
62c4c7b9db Add additional PID column heading
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2001 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-27 13:35:59 +00:00
Thomas Guyot-Sionnest
44f8455b2c Added support for --extra-opts in all C plugins (disabled by default, see configure --help)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1991 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-07 10:02:42 +00:00
Thomas Guyot-Sionnest
767bf9a0f2 --help output cleanup (plus removal of spaces on blank lines)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1985 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-29 09:01:31 +00:00
Ton Voon
9188225da4 Fixed 64 bit pst3 when tries to link to gettext. Gettext linked
dynamically, if necessary


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1941 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-14 15:44:27 +00:00
Ton Voon
dc2ec71d22 Fixed link -m64 problems on pst3 for solaris. Fixed _FILE_OFFSET_BITS
redefinition warnings. Fixed helper ar error in ./configure


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1938 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-11 00:10:23 +00:00
Ton Voon
9f3d864fd3 Reverted check_procs for solaris back to using pst3 due to truncation
for argument fields using other methods


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1937 f882894a-f735-0410-b71e-b25c423dba1c
2008-02-28 16:21:59 +00:00
Thomas Guyot-Sionnest
edf361db3e Bump plugins-root/ to GPLv3
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1920 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-31 11:52:45 +00:00
Holger Weiss
be1ba84de5 Hide some debug output which was printed even without "-v" (under
certain circumstances).


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1897 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-08 02:06:35 +00:00
Holger Weiss
6a00f7ecdd Fix the handling of ICMP packets which are not echo replies (such as
destination unreachable messages) or which are not directed at us.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1896 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-08 01:51:14 +00:00
Holger Weiss
5da79db21a Get rid of a cast which increases the required alignment.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1895 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-08 01:43:49 +00:00
Holger Weiss
aa215f26d9 Mark some constant strings "const".
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1894 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-08 01:40:21 +00:00
Holger Weiss
1544007dcf Fix INADDR_NONE value (for systems which don't define it).
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1884 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-21 14:19:08 +00:00
Holger Weiss
50809d42f0 Include <sys/sockio.h> (if available) to get SIOCGIFADDR defined on
Solaris.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1883 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-21 14:17:29 +00:00
Holger Weiss
8a4d06a25f New "-s" option to specify the source IP address (thanks to Harald Jenny
for providing the patch and to Patrick Cervicek for looking into it!)


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1882 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-21 13:25:28 +00:00
Ton Voon
9747b9083c Fixed VPATH problem in plugins-root (Tom Payerle - 1789000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1872 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-13 22:22:27 +00:00
Thomas Guyot-Sionnest
56c9db8516 Adding missing function calls needed for i18n (only for plugins already in POTFILES.in)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1861 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-11 05:57:35 +00:00
Ton Voon
cf0dee616a Automatically update website with --help output. Cosmetic
fixes for some help output


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1810 f882894a-f735-0410-b71e-b25c423dba1c
2007-10-25 20:43:04 +00:00
Holger Weiss
c11f63ff7e Correct all instances of misaligned memory access. This fixes bus erros
on platforms which require alignment (such as SPARC and MIPS).


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1779 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-15 11:55:12 +00:00
Holger Weiss
0a02314e8d The "--serverip" and "--requestedip" options now accept host names, too.
This doesn't quite fit the option names and so far I haven't changed the
"--help" output which currently only talks about IP addresses.  However,
I don't see why resolving host names should not be supported.

Also note that for the moment, I added a quick'n'dirty resolve_host()
function which should really go into netutils.c.  I just wanted to think
about its interface a bit more before providing such a function globally.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1766 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-26 17:32:37 +00:00