From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Artem S. Tashkinov" Subject: Re: A call to revise sockets behaviour Date: Mon, 29 Jul 2013 18:02:16 +0000 (UTC) Message-ID: <2134648871.43175.1375120936132.JavaMail.mail@webmail09> References: <2066879158.39771.1375110634453.JavaMail.mail@webmail09> <20130729083519.5d574f16@nehalam.linuxnetplumber.net> <2063167407.40450.1375112877907.JavaMail.mail@webmail09><1375119778.10515.20.camel@edumazet-glaptop> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: stephen@networkplumber.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org To: eric.dumazet@gmail.com Return-path: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Jul 29, 2013 11:43:00 PM, Eric wrote: On Mon, 2013-07-29 at 15:47 +0000, Artem S. Tashkinov wrote: > >> A wine developer clearly showed that this option simply doesn't work. >> >> http://bugs.winehq.org/show_bug.cgi?id=26031#c21 >> >> Output of strace: >> getsockopt(24, SOL_SOCKET, SO_REUSEADDR, [0], [4]) = 0 >> setsockopt(24, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 >> bind(24, {sa_family=AF_INET, sin_port=htons(43012), sin_addr=inet_addr("0. >> 0.0.0")}, 16) = -1 EADDRINUSE (Address already in use) > >Its clear that some other socket did not use SO_REUSADDR > >All sockets using a given port _must_ have use SO_REUSADDR to allow this >port being reused. > It's exactly what's been tried. A program running with SO_REUSADDR, once no longer running consequently fails to regain the rights for the port.