Skip to content

Commit

Permalink
tcptop: Fix incorrect pid filter
Browse files Browse the repository at this point in the history
Fix incorrect pid filter in tcptop
  • Loading branch information
ethercflow authored and yonghong-song committed Aug 30, 2019
1 parent 270d54a commit 496a2b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/tcptop.py
Expand Up @@ -97,7 +97,7 @@ def range_check(string):
int kprobe__tcp_sendmsg(struct pt_regs *ctx, struct sock *sk,
struct msghdr *msg, size_t size)
{
u32 pid = bpf_get_current_pid_tgid();
u32 pid = bpf_get_current_pid_tgid() >> 32;
FILTER
u16 dport = 0, family = sk->__sk_common.skc_family;
Expand Down Expand Up @@ -134,7 +134,7 @@ def range_check(string):
*/
int kprobe__tcp_cleanup_rbuf(struct pt_regs *ctx, struct sock *sk, int copied)
{
u32 pid = bpf_get_current_pid_tgid();
u32 pid = bpf_get_current_pid_tgid() >> 32;
FILTER
u16 dport = 0, family = sk->__sk_common.skc_family;
u64 *val, zero = 0;
Expand Down

0 comments on commit 496a2b1

Please sign in to comment.