John Fastabend
1aa12bdf1b
bpf: sockmap, add sock close() hook to remove socks
...
The selftests test_maps program was leaving dangling BPF sockmap
programs around because not all psock elements were removed from
the map. The elements in turn hold a reference on the BPF program
they are attached to causing BPF programs to stay open even after
test_maps has completed.
The original intent was that sk_state_change() would be called
when TCP socks went through TCP_CLOSE state. However, because
socks may be in SOCK_DEAD state or the sock may be a listening
socket the event is not always triggered.
To resolve this use the ULP infrastructure and register our own
proto close() handler. This fixes the above case.
Fixes: 174a79ff95 ("bpf: sockmap with sk redirect support")
Reported-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp >
Signed-off-by: John Fastabend <john.fastabend@gmail.com >
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net >
2018-02-06 11:39:32 +01:00
..
2017-11-27 16:20:04 -05:00
2018-01-19 14:02:12 -05:00
2017-11-27 16:20:04 -05:00
2018-01-19 14:00:46 +01:00
2018-01-21 11:35:34 -05:00
2018-02-03 16:25:42 -08:00
2018-01-23 19:51:46 -05:00
2017-12-13 13:58:41 -05:00
2017-12-04 13:35:36 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-01-15 14:53:43 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-01-17 00:10:42 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-01-16 14:15:34 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-30 09:54:25 -05:00
2017-11-04 09:26:51 +09:00
2017-12-07 14:14:54 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-04 09:26:51 +09:00
2017-11-02 11:10:55 +01:00
2018-01-29 10:15:51 -05:00
2018-01-25 21:39:43 -05:00
2017-11-02 11:10:55 +01:00
2017-11-01 11:50:43 +09:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-11 15:36:05 +09:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-10-30 21:09:24 +09:00
2017-11-02 11:10:55 +01:00
2017-12-08 13:32:26 -05:00
2017-11-16 10:49:00 +09:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-12-11 14:10:06 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-01-31 14:31:10 -08:00
2017-11-04 09:26:51 +09:00
2017-11-04 09:26:51 +09:00
2017-12-03 10:18:28 -05:00
2017-12-20 14:00:25 -05:00
2017-12-13 14:33:10 -05:00
2017-11-02 11:10:55 +01:00
2018-01-10 15:14:44 -05:00
2018-01-10 15:14:44 -05:00
2017-12-15 12:34:00 -05:00
2017-12-15 12:34:00 -05:00
2018-01-08 18:01:02 +01:00
2017-12-16 22:11:55 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-01-24 23:44:15 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-12-19 10:12:48 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-04 09:26:51 +09:00
2018-01-29 10:15:51 -05:00
2017-11-02 11:10:55 +01:00
2017-11-04 09:26:51 +09:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-08 16:12:33 +09:00
2017-11-02 11:10:55 +01:00
2018-01-25 21:23:07 -05:00
2018-01-16 14:56:54 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-12-05 14:37:13 -05:00
2017-11-02 11:10:55 +01:00
2018-01-24 19:13:45 -05:00
2017-12-04 11:32:53 -05:00
2018-01-29 12:42:15 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-02-03 16:25:42 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-10 13:41:40 +09:00
2018-02-06 11:39:32 +01:00
2017-11-11 15:36:05 +09:00
2018-01-31 10:26:30 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-27 16:20:04 -05:00
2017-11-02 11:10:55 +01:00
2018-01-17 16:07:24 -05:00
2018-01-24 19:13:45 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-01-05 15:21:21 -08:00
2018-01-18 10:42:59 +01:00