summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_hostcache.c
diff options
context:
space:
mode:
authorLuiz Otavio O Souza <luiz@netgate.com>2017-02-09 12:56:45 -0600
committerLuiz Otavio O Souza <luiz@netgate.com>2017-02-09 12:56:45 -0600
commit91168d55b893d0ff41403098765ffb6a890805a0 (patch)
tree429fd0d8430d5b8140c527d92b60fbb3fe2e2278 /sys/netinet/tcp_hostcache.c
parentac4b1285e0aabc7a59f32412b4f2ca7674c5458f (diff)
parent9077a30ba0ad5458cceb3d0418b2f1ea7f70d556 (diff)
downloadFreeBSD-src-91168d55b893d0ff41403098765ffb6a890805a0.zip
FreeBSD-src-91168d55b893d0ff41403098765ffb6a890805a0.tar.gz
Merge remote-tracking branch 'origin/stable/11' into devel-11
Diffstat (limited to 'sys/netinet/tcp_hostcache.c')
-rw-r--r--sys/netinet/tcp_hostcache.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
index 848c922..a1db048 100644
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -69,10 +69,12 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/jail.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/malloc.h>
+#include <sys/proc.h>
#include <sys/sbuf.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
@@ -623,6 +625,9 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS)
char ip6buf[INET6_ADDRSTRLEN];
#endif
+ if (jailed_without_vnet(curthread->td_ucred) != 0)
+ return (EPERM);
+
sbuf_new(&sb, NULL, linesize * (V_tcp_hostcache.cache_count + 1),
SBUF_INCLUDENUL);
OpenPOWER on IntegriCloud