From c8877d312ba59d36d0670e165639fe65e015824b Mon Sep 17 00:00:00 2001 From: pirofti Date: Tue, 19 Jun 2012 11:28:20 +0000 Subject: 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@ --- sys/compat/linux/linux_socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/compat/linux/linux_socket.c') 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; -- cgit v1.2.3-59-g8ed1b