summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_subr.c
diff options
context:
space:
mode:
authorgnn <gnn@FreeBSD.org>2017-03-30 02:38:30 +0000
committergnn <gnn@FreeBSD.org>2017-03-30 02:38:30 +0000
commit5d1e46a0803ec1a7882e80016c9ebfc55350f7d2 (patch)
tree0eb7d54364e3262ea47989e3345bfae6f974c789 /sys/netinet/tcp_subr.c
parent3b73956452f3e6b0a89b5a700a7268ad7d7f25e7 (diff)
downloadFreeBSD-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.c7
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);
OpenPOWER on IntegriCloud