Mercurial > hg > dhcpcd
changeset 5422:66a1c1c34366 draft
Use a minimum bufsize of 1 as 0 doesn't work on some OS.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Sun, 16 Aug 2020 19:21:48 +0100 |
| parents | 0229b76cea16 |
| children | 28a650d93729 |
| files | src/privsep-root.c |
| diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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)
