summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2010-01-23 16:40:35 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2010-01-23 16:40:35 +0000
commit3bcceea40e03305fc48c713e91b839f6048cab29 (patch)
treeccf399d4805fcadbfdc528f01515f3c265d23b0b /sys/netinet6
parentc79d8f1fb50d55631442b9b1ddf27c51b46e32ba (diff)
Notes
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6_src.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c
index 8e82ef117aef..ea302a52fa4c 100644
--- a/sys/netinet6/in6_src.c
+++ b/sys/netinet6/in6_src.c
@@ -271,6 +271,13 @@ in6_selectsrc(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
}
/*
+ * Bypass source address selection and use the primary jail IP
+ * if requested.
+ */
+ if (cred != NULL && !prison_saddrsel_ip6(cred, srcp))
+ return (0);
+
+ /*
* If the address is not specified, choose the best one based on
* the outgoing interface and the destination address.
*/