summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/compat/linux/linux_socket.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index 56cc92e..c92fd12 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -859,7 +859,10 @@ linux_socketpair(struct thread *td, struct linux_socketpair_args *args)
return (EINVAL);
bsd_args.type = args->type;
- bsd_args.protocol = args->protocol;
+ if (bsd_args.domain == AF_LOCAL && args->protocol == PF_UNIX)
+ bsd_args.protocol = 0;
+ else
+ bsd_args.protocol = args->protocol;
bsd_args.rsv = (int *)PTRIN(args->rsv);
return (socketpair(td, &bsd_args));
}
OpenPOWER on IntegriCloud