summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e56c1e5)
raw | patch | inline | side by side (parent: e56c1e5)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 2 Jul 2017 18:34:59 +0000 (20:34 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 2 Jul 2017 18:34:59 +0000 (20:34 +0200) |
FreeBSD commit https://github.com/freebsd/freebsd/commit/3a5c9aaf2b2ea107bcaf0ba28b706238d92bdbbd
hides inpcb and tcpcb from userland.
Patch taken from FreeBSD ports tree, thanks glebius@.
hides inpcb and tcpcb from userland.
Patch taken from FreeBSD ports tree, thanks glebius@.
src/tcpconns.c | patch | blob | history |
diff --git a/src/tcpconns.c b/src/tcpconns.c
index f949d34ec94ebddf319776dd3963e108c6f2fa77..7036d08b485ffd6ab38e7a38a075f75d18b02358 100644 (file)
--- a/src/tcpconns.c
+++ b/src/tcpconns.c
for (in_ptr = (struct xinpgen *)(((char *)in_orig) + in_orig->xig_len);
in_ptr->xig_len > sizeof(struct xinpgen);
in_ptr = (struct xinpgen *)(((char *)in_ptr) + in_ptr->xig_len)) {
+#if __FreeBSD_version >= 1200026
+ struct xtcpcb *tp = (struct xtcpcb *)in_ptr;
+ struct xinpcb *inp = &tp->xt_inp;
+ struct xsocket *so = &inp->xi_socket;
+#else
struct tcpcb *tp = &((struct xtcpcb *)in_ptr)->xt_tp;
struct inpcb *inp = &((struct xtcpcb *)in_ptr)->xt_inp;
struct xsocket *so = &((struct xtcpcb *)in_ptr)->xt_socket;
+#endif
/* Ignore non-TCP sockets */
if (so->xso_protocol != IPPROTO_TCP)