[PATCH] SO_REUSEADDR and SO_REUSEPORT behaviour
mom040267 at gmail.com
Fri Nov 29 17:18:37 UTC 2013
Joe is right. I've been watching this feature. It is very important for
high-performance media gateways - they use mostly UDP protocol. Linux now
has it. I hope FreeBSD will include it, too.
One thing that makes it especially useful is that the kernel remembers the
networks path (from which remote address to which listening UDP socket) the
packets are being delivered. That allows very efficient and simple UDP
Currently several sockets can listen on the same local address, but the
packets are delivered only to one socket of them.
On Fri, Nov 29, 2013 at 8:31 AM, Joe Holden <lists at rewt.org.uk> wrote:
> On 29/11/2013 16:14, Julian Elischer wrote:
>> On 11/29/13, 8:04 PM, Ermal Luçi wrote:
>>> 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
>>> two daemon with such options to same port to see the same traffic on
>> this is not how I interpret it.. I presume it is is to allow two
>> OUTGOING sessions from the same source.
>>> No, it is to allow multiple listeners bound to the same ip:port. This
> already works in FreeBSD but the kernel does not distribute incoming
> connections to the different threads, rather just the last one that called
> See the article in my previous post for how it should be implemented...
> This is not the case today.
>>> Only multicast sockets seem to have the behaviour of broadcasting the
>>> to all sockets sharing the same properties through these options!
>>> The patch at  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?
>> freebsd-net at freebsd.org mailing list
>> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
> freebsd-net at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
More information about the freebsd-net