Re: in_pcbbind_setup: wrong condition regarding INP_REUSEPORT ?
- In reply to: Andriy Gapon : "Re: in_pcbbind_setup: wrong condition regarding INP_REUSEPORT ?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 04 Nov 2022 00:09:07 UTC
Andriy, On Tue, Oct 04, 2022 at 02:46:51PM +0300, Andriy Gapon wrote: A> Yes, that conditional. A> I pointed out the part of it that does not make sense to me. A> A> Also, in my tests SO_REUSEPORT does not actually allow to share a port. A> Test scenario: A> - create a UDP socket A> - setsockopt(SO_REUSEPORT) A> - bind the socket to a port and wild card address A> - success A> - now repeat the previous steps with the same port *under a different user id* A> - bind fails Sorry for late reply. The described behavior of SO_REUSEPORT is correct. This is what SO_REUSEPORT did back in the original BSD stack and this is what it does today in FreeBSD. 20+ years later Linux introduced a different kinds of functionality under the same socket option name, hence the confusion. I can't say much on the INP_REUSEPORT_LB check in the discussed code :( -- Gleb Smirnoff