svn commit: r198467 - head/sys/compat/linux

Bjoern A. Zeeb bz at FreeBSD.org
Sun Oct 25 09:58:56 UTC 2009


Author: bz
Date: Sun Oct 25 09:58:56 2009
New Revision: 198467
URL: http://svn.freebsd.org/changeset/base/198467

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

Modified:
  head/sys/compat/linux/linux_socket.c

Modified: head/sys/compat/linux/linux_socket.c
==============================================================================
--- head/sys/compat/linux/linux_socket.c	Sun Oct 25 09:48:21 2009	(r198466)
+++ head/sys/compat/linux/linux_socket.c	Sun Oct 25 09:58:56 2009	(r198467)
@@ -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-head mailing list