Tweak linux(4) socket(2) debug messages.
MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26900
This commit is contained in:
parent
62b1382ff3
commit
b3be0b4d0c
@ -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
|
||||
|
@ -514,6 +514,20 @@ linux_socket(struct thread *td, struct linux_socket_args *args)
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user