Mercurial > hg > dhcpcd
changeset 2259:7502a71beb0a draft
As we need to actuall drain the kernel buffer, don't bother setting the receive buffer size
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Fri, 31 Jan 2014 12:03:54 +0000 |
| parents | 83f7b828306e |
| children | 8b82f0165b96 |
| files | dhcp.c |
| diffstat | 1 files changed, 1 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/dhcp.c Fri Jan 31 11:47:27 2014 +0000 +++ b/dhcp.c Fri Jan 31 12:03:54 2014 +0000 @@ -1367,11 +1367,6 @@ sizeof(ifr)) == -1) goto eexit; #endif - /* As we don't use this socket for receiving, set the - * receive buffer to 1 */ - n = 1; - if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, &n, sizeof(n)) == -1) - goto eexit; state = D_STATE(iface); memset(&sin, 0, sizeof(sin)); sin.sin_family = AF_INET; @@ -2510,9 +2505,9 @@ ifp = arg; state = D_CSTATE(ifp); - bytes = read(state->udp_fd, buffer, sizeof(buffer)); /* Just read what's in the UDP fd and discard it as we always read * from the raw fd */ + bytes = read(state->udp_fd, buffer, sizeof(buffer)); } static int
