tcpaccept/tcpconnect: use PID not TID
diff --git a/tools/tcpaccept.py b/tools/tcpaccept.py
index 169b0f3..e08a08e 100755
--- a/tools/tcpaccept.py
+++ b/tools/tcpaccept.py
@@ -89,7 +89,7 @@
int kretprobe__inet_csk_accept(struct pt_regs *ctx)
{
struct sock *newsk = (struct sock *)PT_REGS_RC(ctx);
- u32 pid = bpf_get_current_pid_tgid();
+ u32 pid = bpf_get_current_pid_tgid() >> 32;
##FILTER_PID##
@@ -177,7 +177,7 @@
return 0;
if (args->oldstate != TCP_SYN_RECV || args->newstate != TCP_ESTABLISHED)
return 0;
- u32 pid = bpf_get_current_pid_tgid();
+ u32 pid = bpf_get_current_pid_tgid() >> 32;
##FILTER_PID##