Re: [PATCH v6 bpf-next 2/6] tcp: Move skb_steal_sock() to request_sock.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 14, 2023 at 4:55 PM Kuniyuki Iwashima <kuniyu@xxxxxxxxxx> wrote:
>
> We will support arbitrary SYN Cookie with BPF.
>
> If BPF prog validates ACK and kfunc allocates a reqsk, it will
> be carried to TCP stack as skb->sk with req->syncookie 1.
>
> In skb_steal_sock(), we need to check inet_reqsk(sk)->syncookie
> to see if the reqsk is created by kfunc.  However, inet_reqsk()
> is not available in sock.h.
>
> Let's move skb_steal_sock() to request_sock.h.
>
> While at it, we refactor skb_steal_sock() so it returns early if
> skb->sk is NULL to minimise the following patch.
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>

Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux