aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2010-01-24 14:05:56 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2010-01-24 14:05:56 +0000
commitdd997f0430d5e15eeb8ce7e1eb9f420e16f5825e (patch)
tree03fbe32a7417e9d49a4856313e46d693bfaad9ac /sys/netinet
parenta42a1f8f8f09b5ca24f5e7af844c6f9be7feed62 (diff)
Notes
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/in_pcb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 8bc35775bd74..5854df8e8c59 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -552,6 +552,13 @@ in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr,
KASSERT(laddr != NULL, ("%s: laddr NULL", __func__));
+ /*
+ * Bypass source address selection and use the primary jail IP
+ * if requested.
+ */
+ if (cred != NULL && !prison_saddrsel_ip4(cred, laddr))
+ return (0);
+
error = 0;
ia = NULL;
bzero(&sro, sizeof(sro));