Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Nov 2013 13:19:47 +0100
From:      Daniel Nebdal <dnebdal@gmail.com>
To:        =?ISO-8859-1?Q?Ermal_Lu=E7i?= <eri@freebsd.org>
Cc:        freebsd-net <freebsd-net@freebsd.org>, "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   Re: [PATCH] SO_REUSEADDR and SO_REUSEPORT behaviour
Message-ID:  <CA%2Bt49P%2BQjuV_edhcbcjpUbAU77uEfgiQg4JEJXScH4rYnYkuLw@mail.gmail.com>
In-Reply-To: <CAPBZQG29BEJJ8BK=gn%2Bg_n5o7JSnPbsKQ-=3=6AkFOxzt%2B=wGQ@mail.gmail.com>
References:  <CAPBZQG29BEJJ8BK=gn%2Bg_n5o7JSnPbsKQ-=3=6AkFOxzt%2B=wGQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Nov 29, 2013 at 1:04 PM, Ermal Lu=E7i <eri@freebsd.org> wrote:

> Hello,
>
> since SO_REUSEADDR and SO_REUSEPORT are supposed to allow two daemons to
> share the same port and possibly listening ip, you would expect if you bi=
nd
> two daemon with such options to same port to see the same traffic on both=
!
>
> This is not the case today.
> Only multicast sockets seem to have the behaviour of broadcasting the dat=
a
> to all sockets sharing the same properties through these options!
>
> The patch at [1] implements/corrects the behaviour for UDP sockets.
> Is there anything to be corrected in that patch?
> Why it has not been provided there before?
> Can it be committed to the tree?
> Any extra security checks for jails needed there?
>
>
> [1]
>
> https://github.com/pfsense/pfsense-tools/blob/master/patches/RELENG_10_0/=
udp_SO_REUSEADDR%2BPORT.diff
>
> --
> Ermal


I understood it as working sort of like for TCP, where packages from a
given remote host+port all end up at exactly one of the local sockets? If
the idea is to split the workload over multiple threads holding their own
sockets listening to the same interface+port,  wouldn't sending all packets
to all sockets all the time be kind of counterproductive?

Of course, I haven't actually used it much; I might be wrong.

--=20
Daniel Nebdal



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2Bt49P%2BQjuV_edhcbcjpUbAU77uEfgiQg4JEJXScH4rYnYkuLw>