Re: [PATCH bpf-next v3 05/12] bpf, sockmap: Allow inserting listening TCP sockets into sockmap

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

 



On Wed, Jan 22, 2020 at 09:52 PM CET, Martin Lau wrote:
> On Wed, Jan 22, 2020 at 02:05:42PM +0100, Jakub Sitnicki wrote:
>> In order for sockmap type to become a generic collection for storing TCP
>> sockets we need to loosen the checks during map update, while tightening
>> the checks in redirect helpers.
>>
>> Currently sockmap requires the TCP socket to be in established state (or
>> transitioning out of SYN_RECV into established state when done from BPF),
> If I read the SYN_RECV changes correctly,
> does it mean BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB currently not work?

It works because before this series we didn't have sk_state checks in
bpf_sock_{hash,map}_update helpers.

It was a surprise to find out that BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB
happens when socket is still in SYN_RECV state, though.

Fortunately selftests/bpf/test_sockmap tests cover it.

-jkbs



[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