]> Cypherpunks repositories - gostls13.git/commit
net: protocol specific listen functions return a proper local socket address
authorMikio Hara <mikioh.mikioh@gmail.com>
Tue, 13 Nov 2012 03:56:28 +0000 (12:56 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Tue, 13 Nov 2012 03:56:28 +0000 (12:56 +0900)
commit677c6e6ee7da904e9858ba57afdb92088fd81fe4
tree5a5e383021b3d365444076af278242e7fbd901fa
parent0ae80785e6c6f34e488be2fb5a76e0c1ab44f4a4
net: protocol specific listen functions return a proper local socket address

When a nil listener address is passed to some protocol specific
listen function, it will create an unnamed, unbound socket because
of the nil listener address. Other listener functions may return
invalid address error.

This CL allows to pass a nil listener address to all protocol
specific listen functions to fix above inconsistency. Also make it
possible to return a proper local socket address in case of a nil
listner address.

Fixes #4190.
Fixes #3847.

R=rsc, iant
CC=golang-dev
https://golang.org/cl/6525048
src/pkg/net/ipraw_test.go
src/pkg/net/iprawsock_posix.go
src/pkg/net/tcp_test.go
src/pkg/net/tcpsock_plan9.go
src/pkg/net/tcpsock_posix.go
src/pkg/net/udp_test.go
src/pkg/net/udpsock_plan9.go
src/pkg/net/udpsock_posix.go