mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-17 22:04:40 +00:00
Linux socketpair() call expects explicit specified protocol for
AF_LOCAL domain unlike FreeBSD which expects 0 in this case. Approved by: kib (mentor) MFC after: 1 month
This commit is contained in:
parent
d789bfd562
commit
40092d93b4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=191742
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue