]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1] syscall: workaround accept() bug on Darwin
authorAlexey Borzenkov <snaury@gmail.com>
Fri, 21 Sep 2012 19:54:18 +0000 (05:54 +1000)
committerAndrew Gerrand <adg@golang.org>
Fri, 21 Sep 2012 19:54:18 +0000 (05:54 +1000)
commit56d3f951d1be1bf9d5233003d0f92779231d588e
tree45e3f63a372205f3258fa14242547441a078fe44
parent5efc4b03b4b842f6a4a23db9753712ab565649e3
[release-branch.go1] syscall: workaround accept() bug on Darwin

««« backport 0eae95b0307a
syscall: workaround accept() bug on Darwin

Darwin kernels have a bug in accept() where error result from
an internal call is not checked and socket is accepted instead
of ECONNABORTED error. However, such sockets have no sockaddr,
which results in EAFNOSUPPORT error from anyToSockaddr, making
Go http servers running on Mac OS X easily susceptible to
denial of service from simple port scans with nmap.
Fixes #3849.

R=golang-dev, adg, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/6456045

»»»
src/pkg/syscall/syscall_bsd.go