When retrieving SO_ERROR via getsockopt(), hold the socket lock around
the retrieval and replacement with 0. MFC after: 1 week
This commit is contained in:
parent
5ea8ff67ee
commit
721150ad8f
@ -2180,8 +2180,10 @@ integer:
|
|||||||
goto integer;
|
goto integer;
|
||||||
|
|
||||||
case SO_ERROR:
|
case SO_ERROR:
|
||||||
|
SOCK_LOCK(so);
|
||||||
optval = so->so_error;
|
optval = so->so_error;
|
||||||
so->so_error = 0;
|
so->so_error = 0;
|
||||||
|
SOCK_UNLOCK(so);
|
||||||
goto integer;
|
goto integer;
|
||||||
|
|
||||||
case SO_SNDBUF:
|
case SO_SNDBUF:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user