From owner-freebsd-net@FreeBSD.ORG Fri Nov 29 16:31:16 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D33BE79 for ; Fri, 29 Nov 2013 16:31:16 +0000 (UTC) Received: from mail.lhr1.as41113.net (mail.lhr1.as41113.net [91.208.177.22]) by mx1.freebsd.org (Postfix) with ESMTP id C7282103E for ; Fri, 29 Nov 2013 16:31:15 +0000 (UTC) Received: from [10.16.240.11] (unknown [212.9.98.193]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: lists@rewt.org.uk) by mail.lhr1.as41113.net (Postfix) with ESMTPSA id 3dWLmn1fcnz7rH8 for ; Fri, 29 Nov 2013 16:30:33 +0000 (UTC) Message-ID: <5298C152.4030209@rewt.org.uk> Date: Fri, 29 Nov 2013 16:31:14 +0000 From: Joe Holden User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: freebsd-net@freebsd.org Subject: Re: [PATCH] SO_REUSEADDR and SO_REUSEPORT behaviour References: <5298BD83.2090601@freebsd.org> In-Reply-To: <5298BD83.2090601@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 16:31:16 -0000 On 29/11/2013 16:14, Julian Elischer wrote: > On 11/29/13, 8:04 PM, Ermal Luçi 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 >> bind >> two daemon with such options to same port to see the same traffic on >> both! > 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 listen(). 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 >> data >> 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 >> >> > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"