Make linux(4) warn about unsupported socket(2) types.
MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25680
This commit is contained in:
parent
c59370f055
commit
f4d91df5a0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=366915
@ -513,8 +513,11 @@ linux_socket(struct thread *td, struct linux_socket_args *args)
|
||||
if (retval_socket != 0)
|
||||
return (retval_socket);
|
||||
domain = linux_to_bsd_domain(args->domain);
|
||||
if (domain == -1)
|
||||
if (domain == -1) {
|
||||
linux_msg(curthread, "unsupported socket domain %d, type %d, protocol %d",
|
||||
args->domain, args->type & LINUX_SOCK_TYPE_MASK, args->protocol);
|
||||
return (EAFNOSUPPORT);
|
||||
}
|
||||
|
||||
retval_socket = kern_socket(td, domain, type, args->protocol);
|
||||
if (retval_socket)
|
||||
|
Loading…
Reference in New Issue
Block a user