[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: why cannot bind to someipaddress:port when something else has *:port bound?
¡Hola!
> When you bind a socket to a certain address:port, it's a way to tell the
> kernel that any data that gets to that address:port combination should
> be copied in the socket buffer so read() requests on the socket
> descriptor will return the data.
> Imagine two different daemons binding to the same address:port, and both
> receiving the data. How could a client tell which daemon it's trying to
> contact in such a situation?
Why consider that 0.0.0.0:port is similar to binding on every address at
that port, instead of having it as a default, less specific binding?
Ie, if the specific address is bound, the socket that has made that binding
gets the connection, instead the one binding 0.0.0.0 gets it.
I believe that an extension of the reasoning about this problem is what
decided the OBSD team to not allow the IPv4 mapped addresses when doing
IPv6, breaking the RFC compliance because they saw security problems with
that approach. I want to know why is that (I'm working on a proposal to
allow in the RFC the behaviour OBSD -and NT- have, but need to know better
why they have it, just telling that the RFC tends to suggest a buggy
behaviour isn't enough if I cannot explain very clearly why it's buggy)
Thanks,
HoraPe
---
Horacio J. Peña
horape@compendium.com.ar
horape@uninet.edu
bofh@puntoar.net.ar
horape@hcdn.gov.ar