diff options
Diffstat (limited to 'networking/udhcp/clientpacket.c')
-rw-r--r-- | networking/udhcp/clientpacket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/udhcp/clientpacket.c b/networking/udhcp/clientpacket.c index 5cbe79e7e..6838c07e8 100644 --- a/networking/udhcp/clientpacket.c +++ b/networking/udhcp/clientpacket.c | |||
@@ -78,7 +78,7 @@ static void init_packet(struct dhcpMessage *packet, char type) | |||
78 | memcpy(packet->chaddr, client_config.arp, 6); | 78 | memcpy(packet->chaddr, client_config.arp, 6); |
79 | add_option_string(packet->options, client_config.clientid); | 79 | add_option_string(packet->options, client_config.clientid); |
80 | if (client_config.hostname) add_option_string(packet->options, client_config.hostname); | 80 | if (client_config.hostname) add_option_string(packet->options, client_config.hostname); |
81 | add_option_string(packet->options, (unsigned char *) &vendor_id); | 81 | add_option_string(packet->options, (uint8_t *) &vendor_id); |
82 | } | 82 | } |
83 | 83 | ||
84 | 84 | ||
@@ -179,8 +179,8 @@ int get_raw_packet(struct dhcpMessage *payload, int fd) | |||
179 | { | 179 | { |
180 | int bytes; | 180 | int bytes; |
181 | struct udp_dhcp_packet packet; | 181 | struct udp_dhcp_packet packet; |
182 | u_int32_t source, dest; | 182 | uint32_t source, dest; |
183 | u_int16_t check; | 183 | uint16_t check; |
184 | 184 | ||
185 | memset(&packet, 0, sizeof(struct udp_dhcp_packet)); | 185 | memset(&packet, 0, sizeof(struct udp_dhcp_packet)); |
186 | bytes = read(fd, &packet, sizeof(struct udp_dhcp_packet)); | 186 | bytes = read(fd, &packet, sizeof(struct udp_dhcp_packet)); |
@@ -207,7 +207,7 @@ int get_raw_packet(struct dhcpMessage *payload, int fd) | |||
207 | if (packet.ip.protocol != IPPROTO_UDP || packet.ip.version != IPVERSION || | 207 | if (packet.ip.protocol != IPPROTO_UDP || packet.ip.version != IPVERSION || |
208 | packet.ip.ihl != sizeof(packet.ip) >> 2 || packet.udp.dest != htons(CLIENT_PORT) || | 208 | packet.ip.ihl != sizeof(packet.ip) >> 2 || packet.udp.dest != htons(CLIENT_PORT) || |
209 | bytes > (int) sizeof(struct udp_dhcp_packet) || | 209 | bytes > (int) sizeof(struct udp_dhcp_packet) || |
210 | ntohs(packet.udp.len) != (short) (bytes - sizeof(packet.ip))) { | 210 | ntohs(packet.udp.len) != (uint16_t) (bytes - sizeof(packet.ip))) { |
211 | DEBUG(LOG_INFO, "unrelated/bogus packet"); | 211 | DEBUG(LOG_INFO, "unrelated/bogus packet"); |
212 | return -2; | 212 | return -2; |
213 | } | 213 | } |