diff options
| author | 2012-06-19 11:28:20 +0000 | |
|---|---|---|
| committer | 2012-06-19 11:28:20 +0000 | |
| commit | c8877d312ba59d36d0670e165639fe65e015824b (patch) | |
| tree | 13a59825ece7702f8263daa941aeee75f79e91ce /sys/compat/linux/linux_socket.c | |
| parent | sync the descriptions of /etc/passwd; (diff) | |
| download | wireguard-openbsd-c8877d312ba59d36d0670e165639fe65e015824b.tar.xz wireguard-openbsd-c8877d312ba59d36d0670e165639fe65e015824b.zip | |
Add socket type mask to filter out implementation specific flags.
The newer glibc's, when creating a socket, add some higher bit flags to
the type argument that are used for debug, statistics, profiling
whatever. They are not useful and implementation specific.
This is needed for DNS resolving, otherwise the nss library from glibc
will always fail to do the right thing.
Okay jasper@
Diffstat (limited to 'sys/compat/linux/linux_socket.c')
| -rw-r--r-- | sys/compat/linux/linux_socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index d17d67811e0..4f1ab4ea55b 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_socket.c,v 1.44 2012/04/22 05:43:14 guenther Exp $ */ +/* $OpenBSD: linux_socket.c,v 1.45 2012/06/19 11:28:20 pirofti Exp $ */ /* $NetBSD: linux_socket.c,v 1.14 1996/04/05 00:01:50 christos Exp $ */ /* @@ -245,7 +245,7 @@ linux_socket(p, v, retval) return error; SCARG(&bsa, protocol) = lsa.protocol; - SCARG(&bsa, type) = lsa.type; + SCARG(&bsa, type) = lsa.type & LINUX_SOCKET_TYPE_MASK; SCARG(&bsa, domain) = linux_to_bsd_domain(lsa.domain); if (SCARG(&bsa, domain) == -1) return EINVAL; |
