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,>