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] [day] [month] [year] [list]
Message-Id: <DDVSQC84SOHH.2R3VKM1MF6RMG@bootlin.com>
Date: Thu, 30 Oct 2025 17:27:03 +0100
From: Alexis Lothoré <alexis.lothore@...tlin.com>
To: "Martin KaFai Lau" <martin.lau@...ux.dev>,
 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 Thu Oct 30, 2025 at 5:21 PM CET, Martin KaFai Lau wrote:
> 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.

Sure, I can go for start_server_addr + SO_REUSEADDR :) I'll add it as well
in the incoming follow-up series, next to the missing open_netns checks.

Thanks,

Alexis

-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ