I was recently very surprised to discover that 0.0.0.0 is a valid IP address and actually has a defined "meaning" and use.
IANA allocated 0.0.0.0/32 to mean "This host on this network" as defined by RFC 1122 section 184.108.40.206. While RFC 1122 states it must not be sent in an IP packet as a destination on the network, it does nothing to define how the address should be interpreted inside the host.
Except ... RFC 1122 names it "this host on this network" suggesting a very similar meaning to "localhost".
On Linux attempting to connect to 0.0.0.0 results in a connection to localhost (assuming something is listening). This seems in keeping with the RFC 1122 name. However I don't see it defined in standards (I'm not even sure which standard would cover it since it's internal to the OS).
So my question is: Is Linux's interpretation of
connect() to 0.0.0.0 consistent with other operating systems? Are their any notable exceptions in well known OS Kernels (Windows / UNIXs / ...).
I'm particularly interested in this as a destination address because of the rise in DNS servers "incorrectly" using 0.0.0.0 as a black hole, resulting in spurious connections to localhost.