Re: [PATCH net v2 2/2] selftests: net: Add SO_REUSEPORT bind cache test to bind_wildcard.c

From: Kuniyuki Iwashima

Date: Sat Nov 14 2026 - 02:30:15 EST


On Wed, 11 Nov 2026 12:47:04 -0500, Juan Agustin Niccolini wrote:
> Add a test for the bug fixed by "tcp: Fix the SO_REUSEPORT bind cache
> admitting a conflicting socket". With a 0.0.0.0 listener on the port, a
> v6only [::] SO_REUSEPORT socket fills the bind cache, and a dual-stack
> [::] SO_REUSEPORT socket must then fail to bind with EADDRINUSE.
>
> Without the fix:
>
> # RUN global.reuseport_v6only_cache ...
> # bind_wildcard.c:860:reuseport_v6only_cache:Expected ret (0) == -1 (-1)
> # reuseport_v6only_cache: Test terminated by assertion
> # FAIL global.reuseport_v6only_cache
> not ok 1 global.reuseport_v6only_cache
>
> With it:
>
> # RUN global.reuseport_v6only_cache ...
> # OK global.reuseport_v6only_cache
> ok 1 global.reuseport_v6only_cache
>
> Signed-off-by: Juan Agustin Niccolini <juanagusnicco@xxxxxxxxx>

Reviewed-by: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>