Commit 366eb2e1 authored by Yonghong Song's avatar Yonghong Song

handle return value in kretprobe handler for tcpv4connect

Signed-off-by: default avatarYonghong Song <yhs@plumgrid.com>
parent 99dced73
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment