RE: [PATCH bpf-next v3 01/12] bpf: sockmap: only check ULP for TCP sockets

From: John Fastabend
Date: Fri Mar 06 2020 - 09:57:08 EST


Lorenz Bauer wrote:
> The sock maj code checks that a socket does not have an active upper
> layer protocol before inserting it into the map. This requires casting
> via inet_csk, which isn't valid for UDP sockets.
>
> Guard checks for ULP by checking inet_sk(sk)->is_icsk first.
>
> Signed-off-by: Lorenz Bauer <lmb@xxxxxxxxxxxxxx>
> ---

Acked-by: John Fastabend <john.fastabend@xxxxxxxxx>