Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Oct 2022 05:37:56 -0600
From:      Sean Bruno <sbruno@freebsd.org>
To:        Andriy Gapon <avg@FreeBSD.org>, "net@FreeBSD.org" <net@FreeBSD.org>
Subject:   Re: in_pcbbind_setup: wrong condition regarding INP_REUSEPORT ?
Message-ID:  <896ee089-27ad-c98f-6bf9-4b05caf778fd@freebsd.org>
In-Reply-To: <ef09313c-14f4-01bc-b9c8-043f1c0ee830@FreeBSD.org>
References:  <ef09313c-14f4-01bc-b9c8-043f1c0ee830@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On 10/3/22 04:14, Andriy Gapon wrote:
> 
> I must admit that the condition in question is fairly long and 
> non-trivial and I cannot decipher it, but these two lines look wrong to me:
> 
>                                       (t->inp_flags2 & INP_REUSEPORT) ||
>                                       (t->inp_flags2 & INP_REUSEPORT_LB) 
> == 0) &&
> 
> I'd expect that the check would be symmetric with respect to 
> INP_REUSEPORT and INP_REUSEPORT_LB.
> The problem seems to come from 1a43cff92a20d / r334719 / D11003.
> 

I think you are pointing at this absurd conditional?

https://cgit.freebsd.org/src/tree/sys/netinet/in_pcb.c#n1049

Besides the twisted logic, what problem are you trying to solve?

sean



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?896ee089-27ad-c98f-6bf9-4b05caf778fd>