svn commit: r367001 - head/sys/compat/linux
Edward Tomasz Napierala
trasz at FreeBSD.org
Sat Oct 24 14:25:39 UTC 2020
Author: trasz
Date: Sat Oct 24 14:25:38 2020
New Revision: 367001
URL: https://svnweb.freebsd.org/changeset/base/367001
Log:
Tweak linux(4) socket(2) debug messages.
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26900
Modified:
head/sys/compat/linux/linux.h
head/sys/compat/linux/linux_socket.c
Modified: head/sys/compat/linux/linux.h
==============================================================================
--- head/sys/compat/linux/linux.h Sat Oct 24 14:23:44 2020 (r367000)
+++ head/sys/compat/linux/linux.h Sat Oct 24 14:25:38 2020 (r367001)
@@ -58,6 +58,10 @@ struct l_sockaddr {
#define LINUX_AF_IPX 4
#define LINUX_AF_APPLETALK 5
#define LINUX_AF_INET6 10
+#define LINUX_AF_NETLINK 16
+
+#define LINUX_NETLINK_ROUTE 0
+#define LINUX_NETLINK_UEVENT 15
/*
* net device flags
Modified: head/sys/compat/linux/linux_socket.c
==============================================================================
--- head/sys/compat/linux/linux_socket.c Sat Oct 24 14:23:44 2020 (r367000)
+++ head/sys/compat/linux/linux_socket.c Sat Oct 24 14:25:38 2020 (r367001)
@@ -514,6 +514,20 @@ linux_socket(struct thread *td, struct linux_socket_ar
return (retval_socket);
domain = linux_to_bsd_domain(args->domain);
if (domain == -1) {
+ if (args->domain == LINUX_AF_NETLINK &&
+ args->protocol == LINUX_NETLINK_ROUTE) {
+ linux_msg(curthread,
+ "unsupported socket(AF_NETLINK, %d, NETLINK_ROUTE)", type);
+ return (EAFNOSUPPORT);
+ }
+
+ if (args->domain == LINUX_AF_NETLINK &&
+ args->protocol == LINUX_NETLINK_UEVENT) {
+ linux_msg(curthread,
+ "unsupported socket(AF_NETLINK, %d, NETLINK_UEVENT)", type);
+ return (EAFNOSUPPORT);
+ }
+
linux_msg(curthread, "unsupported socket domain %d, type %d, protocol %d",
args->domain, args->type & LINUX_SOCK_TYPE_MASK, args->protocol);
return (EAFNOSUPPORT);
More information about the svn-src-all
mailing list