aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/main.h
diff options
context:
space:
mode:
authorJoe Stringer <joe@wand.net.nz>2018-10-15 10:27:46 -0700
committerAlexei Starovoitov <ast@kernel.org>2018-10-15 16:08:39 -0700
commit5ef0ae84f02a4dbe0e09f89c6481ac13649cb19b (patch)
treec2c999f53cdc4e8cb346d825b2d64af9a4056dea /tools/bpf/bpftool/main.h
parentbpf: Allow sk_lookup with IPv6 module (diff)
downloadlinux-dev-5ef0ae84f02a4dbe0e09f89c6481ac13649cb19b.tar.xz
linux-dev-5ef0ae84f02a4dbe0e09f89c6481ac13649cb19b.zip
bpf: Fix IPv6 dport byte-order in bpf_sk_lookup
Commit 6acc9b432e67 ("bpf: Add helper to retrieve socket in BPF") mistakenly passed the destination port in network byte-order to the IPv6 TCP/UDP socket lookup functions, which meant that BPF writers would need to either manually swap the byte-order of this field or otherwise IPv6 sockets could not be located via this helper. Fix the issue by swapping the byte-order appropriately in the helper. This also makes the API more consistent with the IPv4 version. Fixes: 6acc9b432e67 ("bpf: Add helper to retrieve socket in BPF") Signed-off-by: Joe Stringer <joe@wand.net.nz> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/bpf/bpftool/main.h')
0 files changed, 0 insertions, 0 deletions