o Return ENOTCONN when shutdown(2) on non-connected socket.
PR: kern/84761 Submitted by: James Juran R-test: tools/regression/sockets/shutdown MFC after: 1 month
This commit is contained in:
parent
214c8ff0e4
commit
c5cff17017
@ -1424,6 +1424,8 @@ soshutdown(so, how)
|
||||
|
||||
if (!(how == SHUT_RD || how == SHUT_WR || how == SHUT_RDWR))
|
||||
return (EINVAL);
|
||||
if ((so->so_state & SS_ISCONNECTED) == 0)
|
||||
return (ENOTCONN);
|
||||
|
||||
if (how != SHUT_WR)
|
||||
sorflush(so);
|
||||
|
Loading…
Reference in New Issue
Block a user