mirror of
https://github.com/golang/go
synced 2024-11-20 09:34:52 -07:00
net: disallow dialing and listening on port > 65535 on Plan 9
Since Dial(":80") was implemented on Plan 9 (CL 32593), TestProtocolDialError is failing because dialing a port superior to 65535 is supported on Plan 9. This change disallows dialing and listening on ports superior to 65535. Fixes #17761. Change-Id: I95e8a163eeacf1ccd8ece7b650f16a0531c59709 Reviewed-on: https://go-review.googlesource.com/32594 Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
97b49f660c
commit
5ac3e7d6a7
@ -119,6 +119,11 @@ func startPlan9(ctx context.Context, net string, addr Addr) (ctl *os.File, dest,
|
||||
return
|
||||
}
|
||||
|
||||
if port > 65535 {
|
||||
err = InvalidAddrError("port should be < 65536")
|
||||
return
|
||||
}
|
||||
|
||||
clone, dest, err := queryCS1(ctx, proto, ip, port)
|
||||
if err != nil {
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user