-- 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;
+- /* Currently we send full-sized DHCP packets (zero padded).
+- * If you need to change this: last byte of the packet is
+- * packet.data.options[end_option(packet.data.options)]
+- */
+ udhcp_dump_packet(dhcp_pkt);
+- result = sendto(fd, &packet, IP_UPD_DHCP_SIZE, 0,
++ result = sendto(fd, &packet, p_len, 0,
+ (struct sockaddr *) &dest, sizeof(dest));
+ msg = "sendto";
+ ret_close:
+@@ -245,10 +241,6 @@ int FAST_FUNC udhcp_send_kernel_packet(s
+ int result = -1;
+ const char *msg;
+
+- enum {
+- DHCP_SIZE = sizeof(struct dhcp_packet) - CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS,
+- };
+-
+ fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
+ if (fd < 0) {
+ msg = "socket(%s)";
+@@ -274,9 +266,8 @@ int FAST_FUNC udhcp_send_kernel_packet(s
+ goto ret_close;