]> Cypherpunks repositories - gostls13.git/commit
net: make LookupPort and lookupProtocol work on nacl
authorBrad Fitzpatrick <bradfitz@golang.org>
Fri, 9 Sep 2016 22:51:11 +0000 (22:51 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sun, 11 Sep 2016 04:19:25 +0000 (04:19 +0000)
commit74190735be5e722a0a977d056204307c2468cf21
tree6e92820d623f39a0b3142272604234a7894c4269
parentf7fce1e2088ed888c5ced3f2649af84bc0a672b9
net: make LookupPort and lookupProtocol work on nacl

Also, flesh out the baked-in /etc/services table for LookupPort a bit.

This services map moves from a unix-specific file to a portable file
where nacl can use it.

Also, remove the duplicated entries in the protocol map in different
cases, and just canonicalize the input before looking in the map. Now
it handles any case, including MiXeD cAse.

In the process, add a test that service names for LookupPort are case
insensitive. They were on Windows, but not cgo. Now there's a test and
they're case insensitive in all 3+ paths. Maybe it breaks plan9. We'll
see.

Fixes #17045

Change-Id: Idce7d68703f371727c7505cda03a32bd842298cd
Reviewed-on: https://go-review.googlesource.com/28951
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
src/net/cgo_unix.go
src/net/lookup.go
src/net/lookup_nacl.go [moved from src/net/lookup_stub.go with 94% similarity]
src/net/lookup_test.go
src/net/lookup_unix.go
src/net/port_unix.go