Skip to content

Commit

Permalink
tcpaccept: only show TCP accept event (iovisor#2232)
Browse files Browse the repository at this point in the history
pr iovisor#1842 forgot to add filtering in the new tracepoint code so it's
incorrectly showing every sock:inet_sock_set_state event.

This patch fixes that.
  • Loading branch information
boat0 authored and yonghong-song committed Feb 26, 2019
1 parent e8ece56 commit 2ebdf16
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/tcpaccept.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@
{
if (args->protocol != IPPROTO_TCP)
return 0;
if (args->oldstate != TCP_SYN_RECV || args->newstate != TCP_ESTABLISHED)
return 0;
u32 pid = bpf_get_current_pid_tgid();
##FILTER_PID##
Expand Down

0 comments on commit 2ebdf16

Please sign in to comment.