mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-07-12 15:48:45 +00:00
Changed debug prints
This commit is contained in:
parent
8443090eed
commit
7b3863c678
@ -18,12 +18,9 @@ static __always_inline int add_address_to_chunk(struct pt_regs *ctx, struct tls_
|
||||
|
||||
struct fd_info *fdinfo = bpf_map_lookup_elem(&file_descriptor_to_ipv4, &key);
|
||||
|
||||
log_error(ctx, LOG_DEBUG, 0, 0, 0);
|
||||
if (fdinfo == NULL) {
|
||||
log_error(ctx, LOG_DEBUG, 1, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
log_error(ctx, LOG_DEBUG, 2, 0, 0);
|
||||
|
||||
int err;
|
||||
|
||||
|
@ -217,6 +217,8 @@ static __always_inline void go_crypto_tls_uprobe(struct pt_regs *ctx, struct bpf
|
||||
log_error(ctx, LOG_ERROR_PUTTING_SSL_CONTEXT, pid_tgid, err, 0l);
|
||||
}
|
||||
|
||||
log_error(ctx, LOG_DEBUG, 1, 1, pid_tgid);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -70,10 +70,16 @@ static __always_inline void tcp_kprobe(struct pt_regs *ctx, struct bpf_map_def *
|
||||
|
||||
SEC("kprobe/tcp_sendmsg")
|
||||
void BPF_KPROBE(tcp_sendmsg) {
|
||||
__u64 id = bpf_get_current_pid_tgid();
|
||||
log_error(ctx, LOG_DEBUG, 2, 1, id);
|
||||
|
||||
tcp_kprobe(ctx, &openssl_write_context, true);
|
||||
}
|
||||
|
||||
SEC("kprobe/tcp_recvmsg")
|
||||
void BPF_KPROBE(tcp_recvmsg) {
|
||||
__u64 id = bpf_get_current_pid_tgid();
|
||||
log_error(ctx, LOG_DEBUG, 2, 2, id);
|
||||
|
||||
tcp_kprobe(ctx, &openssl_read_context, false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user