binding by different process on the same port

Willem Jan Withagen wjw at digiware.nl
Sun Dec 18 19:21:36 UTC 2016


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 <wjw at digiware.nl
> <mailto:wjw at digiware.nl>> 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 at freebsd.org <mailto:freebsd-hackers at freebsd.org>
>> mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
>> To unsubscribe, send any mail to
>> "freebsd-hackers-unsubscribe at freebsd.org
>> <mailto:freebsd-hackers-unsubscribe at freebsd.org>"



More information about the freebsd-hackers mailing list