Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions bpf/generictracer/http2_grpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ static __always_inline u8 read_http2_grpc_frame_header(frame_header_t *frame,
return 1;
}

static __always_inline u8 is_settings_frame(unsigned char *p, u32 len) {
frame_header_t frame = {0};

if (!read_http2_grpc_frame_header(&frame, p, len)) {
return 0;
}

return frame.type == FrameSettings && !frame.stream_id;
}

static __always_inline u8 is_headers_frame(const frame_header_t *frame) {
return frame->type == FrameHeaders && frame->stream_id;
}
Expand All @@ -78,7 +68,7 @@ static __always_inline u8 has_preface(unsigned char *p, u32 len) {
}

static __always_inline u8 is_http2_or_grpc(unsigned char *p, u32 len) {
return has_preface(p, len) || is_settings_frame(p, len);
return has_preface(p, len);
}

static __always_inline u8 http_grpc_stream_ended(const frame_header_t *frame) {
Expand Down
2 changes: 2 additions & 0 deletions bpf/generictracer/java_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ int BPF_KPROBE(obi_kprobe_sys_ioctl) {

if (len > 0) {
void *buf = arg + 1 + sizeof(connection_info_t) + sizeof(u32);
const u64 zero = 0;
bpf_map_update_elem(&active_ssl_connections, &p_conn, &zero, BPF_ANY);
handle_buf_with_connection(ctx, &p_conn, buf, len, WITH_SSL, op, orig_dport);
}

Expand Down
3 changes: 3 additions & 0 deletions bpf/generictracer/k_tracer.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ int BPF_KRETPROBE(obi_kretprobe_sys_connect, int res) {
static __always_inline void
tcp_send_ssl_check(u64 id, void *ssl, pid_connection_info_t *p_conn, u16 orig_dport) {
bpf_dbg_printk("id=%d, ssl=%llx", id, ssl);
if (!ssl) {
return;
}
ssl_pid_connection_info_t *s_conn = bpf_map_lookup_elem(&ssl_to_conn, &ssl);
if (s_conn) {
finish_possible_delayed_tls_http_request(&s_conn->p_conn, ssl);
Expand Down