diff --git a/bpf/gotracer/go_nethttp.c b/bpf/gotracer/go_nethttp.c index 1be3e83cf1..ee781fa25b 100644 --- a/bpf/gotracer/go_nethttp.c +++ b/bpf/gotracer/go_nethttp.c @@ -309,7 +309,9 @@ int obi_uprobe_readRequestStart(struct pt_regs *ctx) { connection_info_t *existing = bpf_map_lookup_elem(&ongoing_server_connections, &g_key); - if (!existing) { + // Populate connection info if: no entry exists yet, OR the entry was created by connServe + // with zeroed ports + if (!existing || (existing->d_port == 0 && existing->s_port == 0)) { void *c_ptr = GO_PARAM1(ctx); if (c_ptr) { void *conn_conn_ptr =