Re: [bpf PATCH v2 4/6] bpf: sockmap, tcp_disconnect to listen transition

2018-06-15 Thread Martin KaFai Lau
On Thu, Jun 14, 2018 at 09:45:02AM -0700, John Fastabend wrote: > After adding checks to ensure TCP is in ESTABLISHED state when a > sock is added we need to also ensure that user does not transition > through tcp_disconnect() and back into ESTABLISHED state without > sockmap removing the sock. >

[bpf PATCH v2 4/6] bpf: sockmap, tcp_disconnect to listen transition

2018-06-14 Thread John Fastabend
After adding checks to ensure TCP is in ESTABLISHED state when a sock is added we need to also ensure that user does not transition through tcp_disconnect() and back into ESTABLISHED state without sockmap removing the sock. To do this add unhash hook and remove sock from map there. Reported-by: