Author: trasz
Date: Wed Oct 21 18:45:48 2020
New Revision: 366915
URL: https://svnweb.freebsd.org/changeset/base/366915

Log:
  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

Modified:
  head/sys/compat/linux/linux_socket.c

Modified: head/sys/compat/linux/linux_socket.c
==============================================================================
--- head/sys/compat/linux/linux_socket.c        Wed Oct 21 17:11:57 2020        
(r366914)
+++ head/sys/compat/linux/linux_socket.c        Wed Oct 21 18:45:48 2020        
(r366915)
@@ -513,8 +513,11 @@ linux_socket(struct thread *td, struct linux_socket_ar
        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)
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to