3 ms·
> The root of all this confusion is the small port number space (16 bits). IMO the leak is the real bug and the protocols work as intended. Keep in mind that
by wyldfire 10y ago
> The root of all this confusion is the small port number space (16 bits).
IMO the leak is the real bug and the protocols work as intended. Keep in mind that the stack(s) distinguish TCP connections not by merely one 16-bit port number but by (local port, local addr, remote addr, remote port). This quadruple is effectively 96 bits of identification.
Enlarging the port space has an astonishingly high cost. IMO, it would be easier to just define a new transport protocol or use a network protocol with more addresses (IPv6, e.g.).
- JoeAltmaier 10y agoIt may distinguish them (filter them for correctness) but port numbers must be unique across all legal tuples, right? So its still a 16-bit space. And the cost of adding 112 bits to each message is perhaps overstated in this modern world. Messages often dwarf that. Though agreed it would help to use a new protocol - once you have a uuid in the message header, you can design a protocol that omits all the other constant fields (ip etc) because the uuid can be associated at every stage with all that.
- wyldfire 10y ago> It may distinguish them (filter them for correctness) but port numbers must be unique across all legal tuples, right? No. TCP connections are distinct from one another only by the entire quadruple. There's no (or very nearly no) invalid combinations of ports and IPs.
- JoeAltmaier 10y agoYes. First, the tuple has 5 elements (including Protocol). True that a router can identify uniquely a connection by this tuple, that doesn't speak to dispatching on the client or server endpoint. Every server will listen on a port with a protocol. But then when a connection is made, it will migrate it to a unique local port. Some sharing is possible. Port 80 can be used for HTTP and UDP simultaneously for instance.