RE: [PATCH bpf-next 3/8] bpf, sockmap: Allow inserting listening TCP sockets into SOCKMAP

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

 



Jakub Sitnicki wrote:
> In order for SOCKMAP type to become a generic collection for storing TCP
> sockets we need to loosen the checks in update callback.
> 
> Currently SOCKMAP requires the TCP socket to be in established state, which
> prevents us from using it to keep references to listening sockets.
> 
> Change the update pre-checks so that it is sufficient for socket to be in a
> hash table, i.e. have a local address/port assigned, to be inserted. Return
> -EINVAL if the condition is not met to be consistent with
> REUSEPORT_SOCKARRY map type.
> 
> This creates a possibility of pointing one of the BPF redirect helpers that
> splice two SOCKMAP sockets on ingress or egress at a listening socket,
> which doesn't make sense. Introduce appropriate checks in the helpers so
> that only established TCP sockets can be a target for redirects.
> 
> Signed-off-by: Jakub Sitnicki <jakub@xxxxxxxxxxxxxx>
> ---

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



[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