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: <efa3540a-1f52-46ca-9f49-e631a5e3e48c@linux.dev>
Date: Thu, 30 Oct 2025 09:21:28 -0700
From: Martin KaFai Lau <martin.lau@...ux.dev>
To: Alexis Lothoré <alexis.lothore@...tlin.com>
Cc: Alexei Starovoitov <ast@...nel.org>,
 Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>,
 Eduard Zingerman <eddyz87@...il.com>, Song Liu <song@...nel.org>,
 Yonghong Song <yonghong.song@...ux.dev>,
 John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>,
 Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>,
 Jiri Olsa <jolsa@...nel.org>, Shuah Khan <shuah@...nel.org>,
 ebpf@...uxfoundation.org, Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
 Bastien Curutchet <bastien.curutchet@...tlin.com>, bpf@...r.kernel.org,
 linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH bpf-next v3 3/4] selftests/bpf: integrate
 test_tc_tunnel.sh tests into test_progs

On 10/30/25 7:04 AM, Alexis Lothoré wrote:
>>> +	int family = cfg->ipproto == 6 ? AF_INET6 : AF_INET;
>>> +
>>> +	cfg->server_fd = start_reuseport_server(family, SOCK_STREAM,
>>> +						cfg->server_addr, TEST_PORT,
>>> +						TIMEOUT_MS, 1);
>>
>> Why reuseport is needed? Does it have issue in bind() to the same
>> ip/port in the later sub-test?
> 
> Yes, I observed that is I use the bare start_server, I systematically have
> the first test passing, an all the others failing on the server startup
> with errno 98 (Address already in use). I have been assuming that it is due
> to some TIME_WAIT state on the freshly closed socket, but I may be missing
> something ?

Thanks for confirming. You are right. It should be the TIME_WAIT. Using 
SO_REUSEPORT works but become confusing on what the test is trying to do 
by starting only 1 reuseport server. reuseport is usually used with >1 
server listening on the same address. A better thing to do is to always 
setsockopt(SO_REUSEADDR) in start_server_addr for TCP.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ