lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f314091e-fa6b-3113-c64b-6e38bed907d0@linux.dev>
Date: Mon, 24 Jul 2023 17:42:15 -0700
From: Martin KaFai Lau <martin.lau@...ux.dev>
To: Lorenz Bauer <lmb@...valent.com>
Cc: Hemanth Malla <hemanthmalla@...il.com>, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
 linux-kselftest@...r.kernel.org, Joe Stringer <joe@...ium.io>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 David Ahern <dsahern@...nel.org>,
 Willem de Bruijn <willemdebruijn.kernel@...il.com>,
 Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
 Andrii Nakryiko <andrii@...nel.org>, Song Liu <song@...nel.org>,
 Yonghong Song <yhs@...com>, John Fastabend <john.fastabend@...il.com>,
 KP Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...gle.com>,
 Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
 Joe Stringer <joe@...d.net.nz>, Mykola Lysenko <mykolal@...com>,
 Shuah Khan <shuah@...nel.org>, Kuniyuki Iwashima <kuniyu@...zon.com>
Subject: Re: [PATCH bpf-next v6 8/8] selftests/bpf: Test that SO_REUSEPORT can
 be used with sk_assign helper

On 7/20/23 8:30 AM, Lorenz Bauer wrote:
> +static int echo_test_udp(int fd_sv)
> +{
> +	struct sockaddr_storage addr = {};
> +	socklen_t len = sizeof(addr);
> +	char buff[1] = {};
> +	int fd_cl = -1, ret;
> +
> +	fd_cl = connect_to_fd(fd_sv, 100);
> +	ASSERT_GT(fd_cl, 0, "create_client");
> +	ASSERT_EQ(getsockname(fd_cl, (void *)&addr, &len), 0, "getsockname");
> +
> +	ASSERT_EQ(send(fd_cl, buff, sizeof(buff), 0), 1, "send_client");
> +
> +	ret = recv(fd_sv, buff, sizeof(buff), 0);
> +	if (ret < 0)

I think this needs a close(fd_cl).

> +		return errno;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ