Re: [PATCH bpf] bpf: Fix IPv6 dport byte order in bpf_sk_lookup_udp

2018-11-08 Thread Daniel Borkmann
On 11/07/2018 10:36 PM, Andrey Ignatov wrote: > Lookup functions in sk_lookup have different expectations about byte > order of provided arguments. > > Specifically __inet_lookup, __udp4_lib_lookup and __udp6_lib_lookup > expect dport to be in network byte order and do ntohs(dport) internally. >

Re: [PATCH bpf] bpf: Fix IPv6 dport byte order in bpf_sk_lookup_udp

2018-11-07 Thread Martin Lau
On Wed, Nov 07, 2018 at 01:36:07PM -0800, Andrey Ignatov wrote: > Lookup functions in sk_lookup have different expectations about byte > order of provided arguments. > > Specifically __inet_lookup, __udp4_lib_lookup and __udp6_lib_lookup > expect dport to be in network byte order and do ntohs(dpor

Re: [PATCH bpf] bpf: Fix IPv6 dport byte order in bpf_sk_lookup_udp

2018-11-07 Thread Joe Stringer
On Wed, 7 Nov 2018 at 13:37, Andrey Ignatov wrote: > > Lookup functions in sk_lookup have different expectations about byte > order of provided arguments. > > Specifically __inet_lookup, __udp4_lib_lookup and __udp6_lib_lookup > expect dport to be in network byte order and do ntohs(dport) internal

[PATCH bpf] bpf: Fix IPv6 dport byte order in bpf_sk_lookup_udp

2018-11-07 Thread Andrey Ignatov
Lookup functions in sk_lookup have different expectations about byte order of provided arguments. Specifically __inet_lookup, __udp4_lib_lookup and __udp6_lib_lookup expect dport to be in network byte order and do ntohs(dport) internally. At the same time __inet6_lookup expects dport to be in hos