Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: UnixListener.AcceptUnix returns a UnixConn with incorrect network type string #7183

jgennis opened this issue Jan 22, 2014 · 4 comments


Copy link

@jgennis jgennis commented Jan 22, 2014

What steps will reproduce the problem?

Run the code at on a system supporting the
"unixpacket" network type (not

What is the expected output?


What do you see instead?


Which compiler are you using (5g, 6g, 8g, gccgo)?


Which operating system are you using?


Which version are you using?  (run 'go version')

go version go1.2 linux/amd64

Please provide any additional information below.

It looks like the problem is that UnixListener.AcceptUnix unconditionally passes
sockaddrToUnix to the fd.accept() call that it makes.  I'm guessing that it should
instead pass either sockaddrToUnix or sockaddrToUnixpacket based on the network type of
the listener.

Note that the underlying socket appears to be the correct type.  It's just the reported
*Addr().Network() strings that are wrong.
Copy link

@mikioh mikioh commented Jan 22, 2014

Comment 1:

Labels changed: added release-go1.3.

Status changed to Accepted.

Copy link

@mikioh mikioh commented Jan 23, 2014

Comment 2:

Labels changed: added repo-main.

Copy link

@mikioh mikioh commented Jan 29, 2014

Comment 3:

This issue was closed by revision 731e6f7.

Status changed to Fixed.

Copy link

@gopherbot gopherbot commented Jun 12, 2014

Comment 4:

CL mentions this issue.
@jgennis jgennis added fixed labels Jun 12, 2014
@rsc rsc added this to the Go1.3 milestone Apr 14, 2015
@rsc rsc removed the release-go1.3 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants