diff options
author | gnn <gnn@FreeBSD.org> | 2017-03-30 02:38:30 +0000 |
---|---|---|
committer | gnn <gnn@FreeBSD.org> | 2017-03-30 02:38:30 +0000 |
commit | 5d1e46a0803ec1a7882e80016c9ebfc55350f7d2 (patch) | |
tree | 0eb7d54364e3262ea47989e3345bfae6f974c789 /sys/netinet/tcp_subr.c | |
parent | 3b73956452f3e6b0a89b5a700a7268ad7d7f25e7 (diff) | |
download | FreeBSD-src-5d1e46a0803ec1a7882e80016c9ebfc55350f7d2.zip FreeBSD-src-5d1e46a0803ec1a7882e80016c9ebfc55350f7d2.tar.gz |
MFC: 311225, 311243, 313045
Fix DTrace TCP tracepoints to not use mtod() as it is both unnecessary and
dangerous. Those wanting data from an mbuf should use DTrace itself to get
the data.
Add an mbuf to ipinfo_t translator to finish cleanup of mbuf passing to TCP probes.
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 4fd388b..be83933 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1129,12 +1129,11 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, if (tp == NULL || (inp->inp_socket->so_options & SO_DEBUG)) tcp_trace(TA_OUTPUT, 0, tp, mtod(m, void *), th, 0); #endif - TCP_PROBE3(debug__output, tp, th, mtod(m, const char *)); + TCP_PROBE3(debug__output, tp, th, m); if (flags & TH_RST) - TCP_PROBE5(accept__refused, NULL, NULL, mtod(m, const char *), - tp, nth); + TCP_PROBE5(accept__refused, NULL, NULL, m, tp, nth); - TCP_PROBE5(send, NULL, tp, mtod(m, const char *), tp, nth); + TCP_PROBE5(send, NULL, tp, m, tp, nth); #ifdef INET6 if (isipv6) (void) ip6_output(m, NULL, NULL, 0, NULL, NULL, inp); |