Jakub Sitnicki
0ab5539f85
selftests/bpf: Tests for BPF_SK_LOOKUP attach point
Add tests to test_progs that exercise:
- attaching/detaching/querying programs to BPF_SK_LOOKUP hook,
- redirecting socket lookup to a socket selected by BPF program,
- failing a socket lookup on BPF program's request,
- error scenarios for selecting a socket from BPF program,
- accessing BPF program context,
- attaching and running multiple BPF programs.
Run log:
bash-5.0# ./test_progs -n 70
#70/1 query lookup prog:OK
#70/2 TCP IPv4 redir port:OK
#70/3 TCP IPv4 redir addr:OK
#70/4 TCP IPv4 redir with reuseport:OK
#70/5 TCP IPv4 redir skip reuseport:OK
#70/6 TCP IPv6 redir port:OK
#70/7 TCP IPv6 redir addr:OK
#70/8 TCP IPv4->IPv6 redir port:OK
#70/9 TCP IPv6 redir with reuseport:OK
#70/10 TCP IPv6 redir skip reuseport:OK
#70/11 UDP IPv4 redir port:OK
#70/12 UDP IPv4 redir addr:OK
#70/13 UDP IPv4 redir with reuseport:OK
#70/14 UDP IPv4 redir skip reuseport:OK
#70/15 UDP IPv6 redir port:OK
#70/16 UDP IPv6 redir addr:OK
#70/17 UDP IPv4->IPv6 redir port:OK
#70/18 UDP IPv6 redir and reuseport:OK
#70/19 UDP IPv6 redir skip reuseport:OK
#70/20 TCP IPv4 drop on lookup:OK
#70/21 TCP IPv6 drop on lookup:OK
#70/22 UDP IPv4 drop on lookup:OK
#70/23 UDP IPv6 drop on lookup:OK
#70/24 TCP IPv4 drop on reuseport:OK
#70/25 TCP IPv6 drop on reuseport:OK
#70/26 UDP IPv4 drop on reuseport:OK
#70/27 TCP IPv6 drop on reuseport:OK
#70/28 sk_assign returns EEXIST:OK
#70/29 sk_assign honors F_REPLACE:OK
#70/30 sk_assign accepts NULL socket:OK
#70/31 access ctx->sk:OK
#70/32 narrow access to ctx v4:OK
#70/33 narrow access to ctx v6:OK
#70/34 sk_assign rejects TCP established:OK
#70/35 sk_assign rejects UDP connected:OK
#70/36 multi prog - pass, pass:OK
#70/37 multi prog - drop, drop:OK
#70/38 multi prog - pass, drop:OK
#70/39 multi prog - drop, pass:OK
#70/40 multi prog - pass, redir:OK
#70/41 multi prog - redir, pass:OK
#70/42 multi prog - drop, redir:OK
#70/43 multi prog - redir, drop:OK
#70/44 multi prog - redir, redir:OK
#70 sk_lookup:OK
Summary: 1/44 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200717103536.397595-16-jakub@cloudflare.com
2020-07-17 20:18:17 -07:00
..
2020-06-25 16:08:47 -07:00
2020-03-23 20:51:55 +01:00
2020-06-01 15:21:03 -07:00
2020-06-24 18:37:59 -07:00
2020-06-24 18:37:59 -07:00
2020-07-13 20:59:25 -07:00
2020-06-24 18:37:59 -07:00
2020-07-03 23:25:40 +02:00
2020-06-24 18:37:59 -07:00
2020-06-24 18:37:59 -07:00
2020-06-24 18:37:59 -07:00
2020-05-09 17:05:27 -07:00
2020-05-09 17:05:27 -07:00
2020-06-24 18:37:59 -07:00
2020-06-24 18:37:59 -07:00
2020-06-24 18:37:59 -07:00
2020-06-24 18:37:59 -07:00
2020-06-24 18:37:59 -07:00
2020-06-24 18:37:59 -07:00
2020-06-24 18:37:59 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-12-15 16:53:51 -08:00
2019-12-15 16:53:51 -08:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-11-04 16:06:56 +01:00
2019-12-15 16:53:51 -08:00
2019-08-07 14:43:49 -07:00
2019-11-04 16:06:56 +01:00
2019-11-04 16:06:56 +01:00
2019-11-04 16:06:56 +01:00
2019-11-04 16:06:56 +01:00
2019-11-04 16:06:56 +01:00
2019-10-15 16:06:05 -07:00
2019-10-15 16:06:05 -07:00
2019-10-15 16:06:05 -07:00
2019-10-15 16:06:05 -07:00
2019-10-15 16:06:05 -07:00
2019-10-15 16:06:05 -07:00
2019-10-15 16:06:05 -07:00
2019-10-15 16:06:05 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-08-07 14:43:49 -07:00
2019-11-04 16:06:56 +01:00
2019-11-04 16:06:56 +01:00
2020-07-13 10:42:03 -07:00
2019-05-24 14:05:58 -07:00
2019-05-24 14:05:58 -07:00
2019-05-24 14:05:58 -07:00
2019-05-24 14:05:58 -07:00
2019-05-24 14:05:58 -07:00
2019-10-09 15:38:36 -07:00
2020-03-04 17:00:06 +01:00
2020-05-14 18:41:08 -07:00
2020-06-24 11:21:03 -07:00
2020-01-20 16:37:45 -08:00
2020-05-19 11:32:04 -07:00
2020-05-19 11:32:04 -07:00
2020-05-11 16:56:47 +02:00
2020-01-20 16:37:45 -08:00
2020-06-30 22:21:29 +02:00
2020-03-02 16:25:14 -08:00
2020-03-02 16:25:14 -08:00
2020-06-30 22:21:29 +02:00
2020-04-24 17:34:30 -07:00
2020-01-20 16:37:45 -08:00
2020-03-02 16:25:14 -08:00
2020-06-11 16:05:56 +02:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-04-02 19:42:52 -07:00
2020-06-22 22:22:59 +02:00
2020-03-04 13:41:06 -08:00
2020-01-20 16:37:45 -08:00
2020-06-01 14:38:22 -07:00
2019-05-23 16:20:57 +02:00
2019-05-23 16:20:57 +02:00
2019-05-23 16:20:57 +02:00
2019-06-19 02:22:52 +02:00
2019-06-19 02:22:52 +02:00
2020-01-10 17:20:07 +01:00
2020-01-20 16:37:45 -08:00
2020-06-01 14:38:22 -07:00
2020-01-20 16:37:45 -08:00
2019-02-11 20:31:38 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-03-17 19:28:27 +01:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-06-17 10:54:05 -07:00
2019-06-19 02:22:52 +02:00
2019-06-19 02:22:52 +02:00
2019-06-19 02:22:52 +02:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-03-02 16:25:14 -08:00
2020-06-28 10:06:53 -07:00
2020-04-24 17:47:40 -07:00
2020-04-28 17:35:03 -07:00
2020-04-24 17:47:40 -07:00
2020-04-24 17:47:40 -07:00
2020-03-30 17:36:41 -07:00
2020-06-02 11:50:23 -07:00
2020-04-26 10:00:36 -07:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-07-09 00:44:45 +02:00
2020-05-01 10:36:32 -07:00
2020-07-01 09:06:12 +02:00
2020-03-30 15:00:30 -07:00
2020-06-24 11:10:59 -07:00
2020-03-30 01:17:35 +02:00
2020-01-20 16:37:45 -08:00
2020-01-10 17:20:07 +01:00
2020-01-20 16:37:45 -08:00
2020-01-10 17:20:07 +01:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2019-07-03 15:06:33 +02:00
2020-06-22 17:01:48 -07:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-03-02 22:06:27 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-05-20 20:21:53 -07:00
2020-03-12 17:40:47 -07:00
2020-04-28 17:27:08 -07:00
2020-05-15 13:48:59 -07:00
2020-03-02 16:25:14 -08:00
2020-07-09 00:44:45 +02:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-22 23:04:53 +01:00
2020-01-20 16:37:45 -08:00
2020-03-02 16:25:14 -08:00
2019-02-11 20:31:38 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-06-01 14:38:22 -07:00
2020-06-01 14:38:22 -07:00
2020-01-20 16:37:45 -08:00
2020-01-24 22:12:13 +01:00
2020-03-05 14:02:41 -08:00
2020-04-29 23:31:00 +02:00
2020-05-21 17:44:25 -07:00
2020-07-17 20:18:17 -07:00
2020-01-20 16:37:45 -08:00
2020-03-03 16:23:59 -08:00
2020-06-01 14:38:21 -07:00
2020-07-13 17:07:43 -07:00
2020-06-01 14:38:20 -07:00
2020-01-20 16:37:45 -08:00
2019-02-11 20:31:38 -08:00
2019-02-11 20:31:38 -08:00
2020-06-28 08:33:28 -07:00
2020-02-21 22:29:46 +01:00
2020-01-20 16:37:45 -08:00
2019-02-11 20:31:38 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-04-28 15:31:59 -07:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-03-02 16:25:14 -08:00
2020-01-20 16:37:45 -08:00
2020-06-24 00:04:36 +02:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-07-01 15:10:27 -07:00
2020-05-14 21:21:57 -07:00
2020-05-14 21:21:57 -07:00
2020-03-12 17:47:38 -07:00
2020-06-09 11:36:19 -07:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-07-16 17:00:32 +02:00
2020-06-25 22:36:00 +02:00
2020-01-20 16:37:45 -08:00
2020-07-13 16:55:49 -07:00
2020-05-13 12:19:38 -07:00
2020-07-08 01:07:36 +02:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00
2020-01-20 16:37:45 -08:00