svn commit: r200179 - stable/8/sys/compat/linux

Bjoern A. Zeeb bz at FreeBSD.org
Sun Dec 6 09:36:11 UTC 2009


Author: bz
Date: Sun Dec  6 09:36:11 2009
New Revision: 200179
URL: http://svn.freebsd.org/changeset/base/200179

Log:
  MFC r198467:
  
    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

Modified:
  stable/8/sys/compat/linux/linux_socket.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/compat/linux/linux_socket.c
==============================================================================
--- stable/8/sys/compat/linux/linux_socket.c	Sun Dec  6 08:59:19 2009	(r200178)
+++ stable/8/sys/compat/linux/linux_socket.c	Sun Dec  6 09:36:11 2009	(r200179)
@@ -639,19 +639,12 @@ linux_socket(struct thread *td, struct l
 	}
 #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;


More information about the svn-src-stable mailing list