projects
/
platform
/
upstream
/
bcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99dced7
)
handle return value in kretprobe handler for tcpv4connect
author
Yonghong Song
<yhs@plumgrid.com>
Wed, 7 Oct 2015 15:59:42 +0000
(08:59 -0700)
committer
Yonghong Song
<yhs@plumgrid.com>
Wed, 7 Oct 2015 15:59:42 +0000
(08:59 -0700)
Signed-off-by: Yonghong Song <yhs@plumgrid.com>
tools/tcpv4connect
patch
|
blob
|
history
diff --git
a/tools/tcpv4connect
b/tools/tcpv4connect
index
fdada97
..
67a2894
100755
(executable)
--- a/
tools/tcpv4connect
+++ b/
tools/tcpv4connect
@@
-61,6
+61,13
@@
int kretprobe__tcp_v4_connect(struct pt_regs *ctx)
return 0; // missed entry
}
+ if (ret != 0) {
+ // failed to send SYNC packet, socket __sk_common.{skc_rcv_saddr, ...}
+ // may not be populated properly.
+ currsock.delete(&pid);
+ return 0;
+ }
+
// pull in details
struct sock *skp = *skpp;
u32 saddr = 0, daddr = 0;