svn commit: r259559 - user/ae/inet6/sys/netinet6

Andrey V. Elsukov ae at FreeBSD.org
Wed Dec 18 16:12:52 UTC 2013


Author: ae
Date: Wed Dec 18 16:12:51 2013
New Revision: 259559
URL: http://svnweb.freebsd.org/changeset/base/259559

Log:
  Use sockaddr_in6 in prison_check_ip6.

Modified:
  user/ae/inet6/sys/netinet6/in6_src.c

Modified: user/ae/inet6/sys/netinet6/in6_src.c
==============================================================================
--- user/ae/inet6/sys/netinet6/in6_src.c	Wed Dec 18 15:27:48 2013	(r259558)
+++ user/ae/inet6/sys/netinet6/in6_src.c	Wed Dec 18 16:12:51 2013	(r259559)
@@ -196,7 +196,7 @@ srcaddrcmp(struct srcaddr_choice *c, str
 	if (!V_ip6_use_deprecated && IFA6_IS_DEPRECATED(ia))
 		return (-1);
 	/* If jailed, only take addresses of the jail into account. */
-	if (cred != NULL && prison_check_ip6(cred, IA6_IN6(ia)) != 0)
+	if (cred != NULL && prison_check_ip6(cred, IA6_SIN6(ia)) != 0)
 		return (-1);
 	/* Source address can not break the destination zone */
 	srcscope = in6_srcaddrscope(IA6_IN6(ia));
@@ -838,10 +838,12 @@ in6_pcbsetport(struct in6_addr *laddr, s
 	INP_WLOCK_ASSERT(inp);
 	INP_HASH_WLOCK_ASSERT(pcbinfo);
 
+#if 0
 	error = prison_local_ip6(cred, laddr,
 	    ((inp->inp_flags & IN6P_IPV6_V6ONLY) != 0));
 	if (error)
 		return(error);
+#endif
 
 	/* XXX: this is redundant when called from in6_pcbbind */
 	if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0)


More information about the svn-src-user mailing list