Skip to content

Commit

Permalink
tcptracer: initialize skc_net variable
Browse files Browse the repository at this point in the history
We need to do this in old kernels since the verifier was stricter then.

Tested with 4.4.105.
  • Loading branch information
iaguis committed Dec 12, 2017
1 parent b384b76 commit 926d667
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/tcptracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@
// 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
Expand Down

0 comments on commit 926d667

Please sign in to comment.