]> Cypherpunks repositories - gostls13.git/commit
net: make Dial, Listen{,Packet} for TCP/UDP with invalid port fail
authorMikio Hara <mikioh.mikioh@gmail.com>
Tue, 21 Jul 2015 03:51:01 +0000 (12:51 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Sun, 1 Nov 2015 05:28:17 +0000 (05:28 +0000)
commitb50b21d3e130cf19de99c2736d038b636dde75c3
treeff8bac2a3f5b28546610e6f877fd7a2f7cd38850
parent3d5163cf4348b5e697dcbf09897a62893876ac3c
net: make Dial, Listen{,Packet} for TCP/UDP with invalid port fail

This change makes Dial, Listen and ListenPacket with invalid port fail
whatever GODEBUG=netdns is.

Please be informed that cgoLookupPort with an out of range literal
number may return either the lower or upper bound value, 0 or 65535,
with no error on some platform.

Fixes #11715.

Change-Id: I43f9c4fb5526d1bf50b97698e0eb39d29fd74c35
Reviewed-on: https://go-review.googlesource.com/12447
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/error_test.go
src/net/ipsock.go
src/net/lookup.go
src/net/parse.go
src/net/parse_test.go
src/net/port.go [deleted file]
src/net/port_test.go