Commit 445e72c7 authored by Yucong Sun's avatar Yucong Sun Committed by Andrii Nakryiko

selftests/bpf: Make cgroup_v1v2 use its own port

This patch change cgroup_v1v2 use a different port, avoid conflict with
other tests.
Signed-off-by: default avatarYucong Sun <sunyucong@gmail.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211006185619.364369-8-fallentree@fb.com
parent d719de0d
...@@ -46,7 +46,7 @@ void test_cgroup_v1v2(void) ...@@ -46,7 +46,7 @@ void test_cgroup_v1v2(void)
{ {
struct network_helper_opts opts = {}; struct network_helper_opts opts = {};
int server_fd, client_fd, cgroup_fd; int server_fd, client_fd, cgroup_fd;
static const int port = 60123; static const int port = 60120;
/* Step 1: Check base connectivity works without any BPF. */ /* Step 1: Check base connectivity works without any BPF. */
server_fd = start_server(AF_INET, SOCK_STREAM, NULL, port, 0); server_fd = start_server(AF_INET, SOCK_STREAM, NULL, port, 0);
......
...@@ -18,7 +18,7 @@ int connect_v4_dropper(struct bpf_sock_addr *ctx) ...@@ -18,7 +18,7 @@ int connect_v4_dropper(struct bpf_sock_addr *ctx)
{ {
if (ctx->type != SOCK_STREAM) if (ctx->type != SOCK_STREAM)
return VERDICT_PROCEED; return VERDICT_PROCEED;
if (ctx->user_port == bpf_htons(60123)) if (ctx->user_port == bpf_htons(60120))
return VERDICT_REJECT; return VERDICT_REJECT;
return VERDICT_PROCEED; return VERDICT_PROCEED;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment