mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-27 12:03:45 +08:00
link: Report errors obtaining recv buffer size on link overflow
This commit is contained in:
parent
84fda07e2e
commit
c81acbb4e5
@ -1207,8 +1207,10 @@ dhcpcd_linkoverflow(struct dhcpcd_ctx *ctx)
|
||||
|
||||
socklen = sizeof(rcvbuflen);
|
||||
if (getsockopt(ctx->link_fd, SOL_SOCKET,
|
||||
SO_RCVBUF, &rcvbuflen, &socklen) == -1)
|
||||
SO_RCVBUF, &rcvbuflen, &socklen) == -1) {
|
||||
logerr("%s: getsockopt", __func__);
|
||||
rcvbuflen = 0;
|
||||
}
|
||||
#ifdef __linux__
|
||||
else
|
||||
rcvbuflen /= 2;
|
||||
|
Loading…
Reference in New Issue
Block a user