File nagios-plugins.check_dhcp-char.patch of Package nagios-plugins
---
plugins-root/check_dhcp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/plugins-root/check_dhcp.c
+++ b/plugins-root/check_dhcp.c
@@ -145,7 +145,7 @@ typedef struct dhcp_packet_struct{
unsigned char chaddr [MAX_DHCP_CHADDR_LENGTH]; /* hardware address of this machine */
char sname [MAX_DHCP_SNAME_LENGTH]; /* name of DHCP server */
char file [MAX_DHCP_FILE_LENGTH]; /* boot file name (used for diskless booting?) */
- char options[MAX_DHCP_OPTIONS_LENGTH]; /* options */
+ unsigned char options[MAX_DHCP_OPTIONS_LENGTH]; /* options */
}dhcp_packet;
@@ -783,7 +783,7 @@ int add_dhcp_offer(struct in_addr source
for(x=4;x<MAX_DHCP_OPTIONS_LENGTH;){
/* end of options (0 is really just a pad, but bail out anyway) */
- if((int)offer_packet->options[x]==-1 || (int)offer_packet->options[x]==0)
+ if(offer_packet->options[x]==DHCP_OPTION_END || offer_packet->options[x]==0)
break;
/* get option type */