[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200122205157.b7ljnymrumplfahk@kafai-mbp.dhcp.thefacebook.com>
Date: Wed, 22 Jan 2020 20:52:01 +0000
From: Martin Lau <kafai@...com>
To: Jakub Sitnicki <jakub@...udflare.com>
CC: "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"kernel-team@...udflare.com" <kernel-team@...udflare.com>,
Alexei Starovoitov <alexei.starovoitov@...il.com>,
Daniel Borkmann <daniel@...earbox.net>,
"John Fastabend" <john.fastabend@...il.com>,
Lorenz Bauer <lmb@...udflare.com>
Subject: Re: [PATCH bpf-next v3 05/12] bpf, sockmap: Allow inserting listening
TCP sockets into sockmap
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?
> which prevents inserting listening sockets.
>
> Change the update pre-checks so the socket can also be in listening state.
>
> Since it doesn't make sense to redirect with sockmap to listening sockets,
> add appropriate socket state checks to BPF redirect helpers too.
Acked-by: Martin KaFai Lau <kafai@...com>
Powered by blists - more mailing lists