summaryrefslogtreecommitdiffstats
path: root/plugins-root/check_dhcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-root/check_dhcp.c')
-rw-r--r--plugins-root/check_dhcp.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins-root/check_dhcp.c b/plugins-root/check_dhcp.c
index ad67323..2d22619 100644
--- a/plugins-root/check_dhcp.c
+++ b/plugins-root/check_dhcp.c
@@ -229,7 +229,7 @@ struct in_addr requested_address;
229 229
230int process_arguments(int, char **); 230int process_arguments(int, char **);
231int call_getopt(int, char **); 231int call_getopt(int, char **);
232int validate_arguments(int, int); 232int validate_arguments(int);
233void print_usage(void); 233void print_usage(void);
234void print_help(void); 234void print_help(void);
235 235
@@ -470,10 +470,6 @@ int send_dhcp_discover(int sock){
470 packet_xid=random(); 470 packet_xid=random();
471 discover_packet.xid=htonl(packet_xid); 471 discover_packet.xid=htonl(packet_xid);
472 472
473 /**** WHAT THE HECK IS UP WITH THIS?!? IF I DON'T MAKE THIS CALL, ONLY ONE SERVER RESPONSE IS PROCESSED!!!! ****/
474 /* downright bizzarre... */
475 ntohl(discover_packet.xid);
476
477 /*discover_packet.secs=htons(65535);*/ 473 /*discover_packet.secs=htons(65535);*/
478 discover_packet.secs=0xFF; 474 discover_packet.secs=0xFF;
479 475
@@ -1059,8 +1055,8 @@ int process_arguments(int argc, char **argv){
1059 return ERROR; 1055 return ERROR;
1060 1056
1061 arg_index = call_getopt(argc,argv); 1057 arg_index = call_getopt(argc,argv);
1062 return validate_arguments(argc,arg_index); 1058 return validate_arguments(argc);
1063 } 1059}
1064 1060
1065 1061
1066 1062
@@ -1158,13 +1154,13 @@ int call_getopt(int argc, char **argv){
1158 } 1154 }
1159 1155
1160 1156
1161int validate_arguments(int argc, int arg_index){ 1157int validate_arguments(int argc){
1162 1158
1163 if(argc-optind > 0) 1159 if(argc - optind > 0)
1164 usage(_("Got unexpected non-option argument")); 1160 usage(_("Got unexpected non-option argument"));
1165 1161
1166 return OK; 1162 return OK;
1167 } 1163}
1168 1164
1169 1165
1170#if defined(__sun__) || defined(__solaris__) || defined(__hpux__) 1166#if defined(__sun__) || defined(__solaris__) || defined(__hpux__)