net: clarification on the use of 0.0.0.0/8, ::/128 and ::ffff:0.0.0.0/128 as destination #22827
The fixes for #6290 and #18806 revealed that the use of special IP addresses, 0.0.0.0/8 or ::/128, as the destination is confusing especially when working with datagram transport protocols as described in #22811. It would be better to clarify and to implement consistent API semantics (because some of the special addresses is prohibited from using the destination IP address, so the existing behavior is Go-specific extended interpretation) for avoiding unnecessary confusion.
The text was updated successfully, but these errors were encountered:
Using 0.0.0.0 for ListenUDP listens on all addresses. Calling LocalAddr on that Conn returns 0.0.0.0. Sending to 0.0.0.0 doesn't seem to work on Windows. See #22827. Change-Id: I4a48fbabe65a63e07600a65309977cec08a9c1e5 Reviewed-on: https://go-review.googlesource.com/c/go/+/301850 Run-TryBot: Filippo Valsorda <email@example.com> TryBot-Result: Go Bot <firstname.lastname@example.org> Reviewed-by: David Chase <email@example.com> Trust: Filippo Valsorda <firstname.lastname@example.org>