From 9feec372db00d14b8e528eb54aee2d5fbef97e93 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Sun, 15 Sep 2013 21:38:46 +0000 Subject: [PATCH] Use the address of the inpcb rather than the tcpcb to identify TCP connections. This keeps the tcp provider consistent with the other network providers. Approved by: re (delphij) --- cddl/lib/libdtrace/tcp.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/lib/libdtrace/tcp.d b/cddl/lib/libdtrace/tcp.d index 271266584d48..6d56eb7fca31 100644 --- a/cddl/lib/libdtrace/tcp.d +++ b/cddl/lib/libdtrace/tcp.d @@ -144,7 +144,7 @@ typedef struct tcpinfo { #pragma D binding "1.0" translator translator csinfo_t < struct tcpcb *p > { cs_addr = NULL; - cs_cid = (uint64_t)p; + cs_cid = (uint64_t)(p == NULL ? 0 : p->t_inpcb); cs_pid = 0; cs_zoneid = 0; };