-- result = sendto(fd, &packet, sizeof(struct udp_dhcp_packet), 0, (struct sockaddr *) &dest, sizeof(dest));
-+ result = sendto(fd, &packet, p_len, 0, (struct sockaddr *) &dest, sizeof(dest));
- if (result <= 0) {
- DEBUG(LOG_ERR, "write on socket failed: %m");
- }
-@@ -201,7 +208,7 @@
- return -1;
+ udhcp_dump_packet(dhcp_pkt);
+- result = sendto(fd, &packet, IP_UDP_DHCP_SIZE - padding, /*flags:*/ 0,
++ result = sendto(fd, &packet, p_len, /*flags:*/ 0,
+ (struct sockaddr *) &dest_sll, sizeof(dest_sll));
+ msg = "sendto";
+ ret_close:
+@@ -246,7 +239,6 @@ int FAST_FUNC udhcp_send_kernel_packet(struct dhcp_packet *dhcp_pkt,
+ uint32_t dest_nip, int dest_port)
+ {
+ struct sockaddr_in client;
+- unsigned padding;
+ int fd;
+ int result = -1;
+ const char *msg;
+@@ -277,9 +269,7 @@ int FAST_FUNC udhcp_send_kernel_packet(struct dhcp_packet *dhcp_pkt,