tcp: return EOPNOTSUPP on attempt to connect(2) a listening socket
This is the error code specified by SUS. Only the TCP over IPv6 required
this fix.
Fixes: bd4a39cc93
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D49275
This commit is contained in:
@@ -594,7 +594,7 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td)
|
||||
goto out;
|
||||
}
|
||||
if (SOLISTENING(so)) {
|
||||
error = EINVAL;
|
||||
error = EOPNOTSUPP;
|
||||
goto out;
|
||||
}
|
||||
#ifdef INET
|
||||
|
||||
Reference in New Issue
Block a user