Commit 926d6673 authored by Iago López Galeiras's avatar Iago López Galeiras

tcptracer: initialize skc_net variable

We need to do this in old kernels since the verifier was stricter then.

Tested with 4.4.105.
parent b384b76e
......@@ -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