From owner-freebsd-hackers@freebsd.org Sun Dec 18 19:21:35 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D32B1C87F2E for ; Sun, 18 Dec 2016 19:21:35 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [176.74.240.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CC201B09 for ; Sun, 18 Dec 2016 19:21:34 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from router.digiware.nl (localhost.digiware.nl [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id EC48533092; Sun, 18 Dec 2016 20:21:32 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.com Received: from smtp.digiware.nl ([127.0.0.1]) by router.digiware.nl (router.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id thMDfV-sg6Ye; Sun, 18 Dec 2016 20:21:32 +0100 (CET) Received: from [192.168.10.10] (asus [192.168.10.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.digiware.nl (Postfix) with ESMTPSA id 32E2733091; Sun, 18 Dec 2016 20:21:32 +0100 (CET) Subject: Re: binding by different process on the same port To: Jan Knepper , "freebsd-hackers@freebsd.org" References: <896832c9-7d63-cd9a-b0e9-7ad32e90568a@digiware.nl> <4CD224CB-1114-4361-B46D-5A3E7455DA0B@digitaldaemon.com> From: Willem Jan Withagen Message-ID: <357e648a-d136-c251-bcdd-35eae31527d5@digiware.nl> Date: Sun, 18 Dec 2016 20:21:30 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <4CD224CB-1114-4361-B46D-5A3E7455DA0B@digitaldaemon.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2016 19:21:36 -0000 On 18-12-2016 16:50, Jan Knepper wrote: > I would guess > >> wjw ceph-osd-0 93336 43 tcp4 127.0.0.1:6804 *:* > > was started first. Claiming a specific port on a specific IP address... Well I've been trying to recreate the situation with a fake server programs, one binds on localhost:port and the other on 0.0.0.0:port. And the order does not matter, but I have not (yet) been able to actually register on a port for the second time. So it needs a bit more than just: socket, bind, listen, accept --WjW > Jan > > > > ManiaC++ > Jan Knepper > > On Dec 17, 2016, at 21:20, Willem Jan Withagen > wrote: > >> Hi, >> >> I thought that the following was not (easily) possible? >> wjw ceph-osd-1 93349 14 tcp4 *:6804 *:* >> wjw ceph-osd-0 93336 43 tcp4 127.0.0.1:6804 *:* >> >> Or is it due to: >> - using SO_REUSEADDR >> - the fact that one address is more specific than the other and as >> such they are considered different? >> >> --WjW >> _______________________________________________ >> freebsd-hackers@freebsd.org >> mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to >> "freebsd-hackers-unsubscribe@freebsd.org >> "