summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2009-10-25 09:58:56 +0000
committerbz <bz@FreeBSD.org>2009-10-25 09:58:56 +0000
commitb991a4ad124ba6d7146b64c3f5c06a9a799ceeb7 (patch)
tree90a55a17d34b92974110e5cc1af883f8e46ea3df /sys/compat
parent067cc6fa491ed0b1c8b07808355d705eaa10fdb2 (diff)
downloadFreeBSD-src-b991a4ad124ba6d7146b64c3f5c06a9a799ceeb7.zip
FreeBSD-src-b991a4ad124ba6d7146b64c3f5c06a9a799ceeb7.tar.gz
Unconditionally call the setsockopt for IPV6_V6ONLY for v6 linux sockets
no matter whether we are compiled as module or if our default of the net.inet6.ip6.v6only sysctl already matches what we would set. This avoids unnecessary complications with modules, VIMAGES, INET6 and the sysctl value, especially considering that most users will use linux compat as a module. Discussed with: kib, rwatson (weeks ago) Reviewed by: rwatson MFC after: 6 weeks
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_socket.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index d3860b0..396a71e 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -639,19 +639,12 @@ linux_socket(struct thread *td, struct linux_socket_args *args)
}
#ifdef INET6
/*
- * Linux AF_INET6 socket has IPV6_V6ONLY setsockopt set to 0 by
- * default and some apps depend on this. So, set V6ONLY to 0
- * for Linux apps if the sysctl value is set to 1.
+ * Linux AF_INET6 socket has IPV6_V6ONLY setsockopt set to 0 by default
+ * and some apps depend on this. So, set V6ONLY to 0 for Linux apps.
+ * For simplicity we do this unconditionally of the net.inet6.ip6.v6only
+ * sysctl value.
*/
- if (bsd_args.domain == PF_INET6
-#ifndef KLD_MODULE
- /*
- * XXX: Avoid undefined symbol error with an IPv4 only
- * kernel.
- */
- && V_ip6_v6only
-#endif
- ) {
+ if (bsd_args.domain == PF_INET6) {
int v6only;
v6only = 0;
OpenPOWER on IntegriCloud