summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorEthan Galstad <egalstad@users.sourceforge.net>2004-05-20 06:09:40 (GMT)
committerEthan Galstad <egalstad@users.sourceforge.net>2004-05-20 06:09:40 (GMT)
commitf6bb1f7e4b34fcf53a29a20373e9e88160f49c87 (patch)
treeeeea0befe22c9d7ec4aad0ea4f976ae1a86191dc /contrib
parentb36ac42b73238d45c00d61ba6657fece3489b897 (diff)
downloadmonitoring-plugins-f6bb1f7e4b34fcf53a29a20373e9e88160f49c87.tar.gz
DHCP bug fix
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@876 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'contrib')
-rw-r--r--contrib/check_dhcp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/check_dhcp.c b/contrib/check_dhcp.c
index 7aa87ac..8669e44 100644
--- a/contrib/check_dhcp.c
+++ b/contrib/check_dhcp.c
@@ -4,7 +4,7 @@
4* 4*
5* Program: DHCP plugin for Nagios 5* Program: DHCP plugin for Nagios
6* License: GPL 6* License: GPL
7* Copyright (c) 2001-2002 Ethan Galstad (nagios@nagios.org) 7* Copyright (c) 2001-2004 Ethan Galstad (nagios@nagios.org)
8* 8*
9* License Information: 9* License Information:
10* 10*
@@ -480,6 +480,7 @@ int receive_dhcp_packet(void *buffer, int buffer_size, int sock, int timeout, st
480 /* why do we need to peek first? i don't know, its a hack. without it, the source address of the first packet received was 480 /* why do we need to peek first? i don't know, its a hack. without it, the source address of the first packet received was
481 not being interpreted correctly. sigh... */ 481 not being interpreted correctly. sigh... */
482 bzero(&source_address,sizeof(source_address)); 482 bzero(&source_address,sizeof(source_address));
483 address_size=sizeof(source_address);
483 recv_result=recvfrom(sock,(char *)buffer,buffer_size,MSG_PEEK,(struct sockaddr *)&source_address,&address_size); 484 recv_result=recvfrom(sock,(char *)buffer,buffer_size,MSG_PEEK,(struct sockaddr *)&source_address,&address_size);
484#ifdef DEBUG 485#ifdef DEBUG
485 printf("recv_result_1: %d\n",recv_result); 486 printf("recv_result_1: %d\n",recv_result);
@@ -820,7 +821,7 @@ void print_help(void){
820 821
821 /*print_revision(progname,"$Revision$");*/ 822 /*print_revision(progname,"$Revision$");*/
822 823
823 printf("Copyright (c) 2001-2002 Ethan Galstad (nagios@nagios.org)\n\n"); 824 printf("Copyright (c) 2001-2004 Ethan Galstad (nagios@nagios.org)\n\n");
824 printf("This plugin tests the availability of DHCP servers on a network.\n\n"); 825 printf("This plugin tests the availability of DHCP servers on a network.\n\n");
825 826
826 print_usage(); 827 print_usage();