-
Notifications
You must be signed in to change notification settings - Fork 61
tcptracer-bpf.c: remove dead entries from the tuplepid_ipv{4,6} #23
tcptracer-bpf.c: remove dead entries from the tuplepid_ipv{4,6} #23
Conversation
998563b
to
7ca3e09
Compare
I tested this branch with half-duplex connections because the tcp connections goes to different states in the kernel in those cases (calling Calling
Calling
Note: I am using the busybox netcat. The GNU netcat or BSD netcat have a different implementation, they might not use And it worked fine for me. |
@@ -538,6 +538,9 @@ int kprobe__tcp_set_state(struct pt_regs *ctx) | |||
if (!read_ipv4_tuple(&t, status, skp)) { | |||
return 0; | |||
} | |||
if (state == TCP_CLOSE) { | |||
bpf_map_delete_elem(&tuplepid_ipv4, &t); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
a2673fb
to
5078a60
Compare
7832fa1
to
0f7607a
Compare
This patch avoids that `tuplepid_ipv{4,6}` fill up with dead entries because a connection was refused. Fixes weaveworks#21
This test makes sure that `tuplepid_ipv{4,6}` do not fill up with dead connections.
0f7607a
to
a3e68dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
513e367
to
a3e68dd
Compare
…racer Remove network-tracer agent as it's been merged into another repo
This patch avoids that
tuplepid_ipv{4,6}
fill up with dead entriesbecause a connection was refused.
Fixes #21
Depends on #25