diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2021-02-19 23:41:16 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2021-11-03 22:18:02 +0100 |
commit | c277724e67bffa65112c506e23dd864c6de5b925 (patch) | |
tree | 6d7467b3511b9555135e04c240741c9724421691 /version.go | |
parent | 52704c4b928889f88b1c8effcd02788000e2a780 (diff) |
netstack: allow listening to 0.0.0.0 and ::fix/listen-any-addresses
convertToFullAddr: Replace 0.0.0.0 and :: with the empty string,
which is used by Gvisor's tcpip stack to represent the unspecified
addresses.
This fixes the following errors when using an unspecified address in
a call to ListenTCP:
tnet.ListenTCP(&net.TCPAddr{IP: net.ParseIP("::"), Port: 80})
> panic: bind tcp 0.0.0.0:80: bad local address
tnet.ListenTCP(&net.TCPAddr{IP: net.ParseIP("0.0.0.0"), Port: 80})
> panic: bind tcp [::]:80: bad local address
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
Diffstat (limited to 'version.go')
0 files changed, 0 insertions, 0 deletions