udhcp: fix oversized packet sending (introduced by "slack for bad dhcp servers" options);
slight optimizations and function renaming udhcp_send_raw_packet - 391 +391 udhcp_send_kernel_packet - 197 +197 udhcp_recv_packet - 134 +134 get_raw_packet 353 326 -27 udhcp_get_packet 134 - -134 udhcp_kernel_packet 197 - -197 udhcp_raw_packet 391 - -391 ------------------------------------------------------------------------------ (add/remove: 3/3 grow/shrink: 0/1 up/down: 722/-749) Total: -27 bytes
This commit is contained in:
@@ -133,7 +133,7 @@ int udhcpd_main(int argc, char **argv)
|
||||
default: continue; /* signal or error (probably EINTR) */
|
||||
}
|
||||
|
||||
bytes = udhcp_get_packet(&packet, server_socket); /* this waits for a packet - idle */
|
||||
bytes = udhcp_recv_packet(&packet, server_socket); /* this waits for a packet - idle */
|
||||
if (bytes < 0) {
|
||||
if (bytes == -1 && errno != EINTR) {
|
||||
DEBUG("error on read, %s, reopening socket", strerror(errno));
|
||||
|
Reference in New Issue
Block a user