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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=159752
@ -2180,8 +2180,10 @@ sogetopt(so, sopt)
|
||||
goto integer;
|
||||
|
||||
case SO_ERROR:
|
||||
SOCK_LOCK(so);
|
||||
optval = so->so_error;
|
||||
so->so_error = 0;
|
||||
SOCK_UNLOCK(so);
|
||||
goto integer;
|
||||
|
||||
case SO_SNDBUF:
|
||||
|
Loading…
Reference in New Issue
Block a user