summaryrefslogtreecommitdiff
path: root/networking/udhcp/packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/packet.c')
-rw-r--r--networking/udhcp/packet.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c
index 44d9cee..ad0028b 100644
--- a/networking/udhcp/packet.c
+++ b/networking/udhcp/packet.c
@@ -191,7 +191,8 @@ int FAST_FUNC udhcp_send_raw_packet(struct dhcp_packet *dhcp_pkt,
/* Let the kernel do all the work for packet generation */
int FAST_FUNC udhcp_send_kernel_packet(struct dhcp_packet *dhcp_pkt,
uint32_t source_nip, int source_port,
- uint32_t dest_nip, int dest_port)
+ uint32_t dest_nip, int dest_port,
+ int send_flags)
{
struct sockaddr_in sa;
unsigned padding;
@@ -228,8 +229,8 @@ int FAST_FUNC udhcp_send_kernel_packet(struct dhcp_packet *dhcp_pkt,
padding = DHCP_OPTIONS_BUFSIZE - 1 - udhcp_end_option(dhcp_pkt->options);
if (padding > DHCP_SIZE - 300)
padding = DHCP_SIZE - 300;
- result = safe_write(fd, dhcp_pkt, DHCP_SIZE - padding);
- msg = "write";
+ result = send(fd, dhcp_pkt, DHCP_SIZE - padding, send_flags);
+ msg = "send";
ret_close:
close(fd);
if (result < 0) {