Commit 956a9832 authored by yonghong-song's avatar yonghong-song Committed by GitHub

Merge pull request #1483 from kinvolk/iaguis/fix-tcptracer-old-kernels

tcptracer: initialize skc_net variable
parents 2d45e02f 926d6673
......@@ -433,7 +433,7 @@ int trace_accept_return(struct pt_regs *ctx)
// Get network namespace id, if kernel supports it
#ifdef CONFIG_NET_NS
possible_net_t skc_net;
possible_net_t skc_net = { };
bpf_probe_read(&skc_net, sizeof(skc_net), &newsk->__sk_common.skc_net);
bpf_probe_read(&net_ns_inum, sizeof(net_ns_inum), &skc_net.net->ns.inum);
#else
......
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