# HG changeset patch # User Roy Marples # Date 1597602108 -3600 # Node ID 66a1c1c34366ac8ae070fd462db597a20f7a8e03 # Parent 0229b76cea16010a75c1fad25c6a4c46c83d1a80 Use a minimum bufsize of 1 as 0 doesn't work on some OS. diff -r 0229b76cea16 -r 66a1c1c34366 src/privsep-root.c --- a/src/privsep-root.c Sun Aug 16 18:52:17 2020 +0100 +++ b/src/privsep-root.c Sun Aug 16 19:21:48 2020 +0100 @@ -645,7 +645,7 @@ * Reading from it just to drain it is a waste of CPU time. */ #ifdef INET if (ctx->options & DHCPCD_IPV4) { - int buflen = 0; + int buflen = 1; ctx->udp_wfd = xsocket(PF_INET, SOCK_RAW | SOCK_CXNB, IPPROTO_UDP); @@ -658,7 +658,7 @@ #endif #ifdef INET6 if (ctx->options & DHCPCD_IPV6) { - int buflen = 0; + int buflen = 1; ctx->nd_fd = ipv6nd_open(false); if (ctx->nd_fd == -1) @@ -670,7 +670,7 @@ #endif #ifdef DHCP6 if (ctx->options & DHCPCD_IPV6) { - int buflen = 0; + int buflen = 1; ctx->dhcp6_wfd = dhcp6_openraw(); if (ctx->dhcp6_wfd == -1)