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: tcp4 Listener on 0.0.0.0 has IPv6 address :: on Plan 9 #40045

Closed
fhs opened this issue Jul 4, 2020 · 1 comment
Closed

net: tcp4 Listener on 0.0.0.0 has IPv6 address :: on Plan 9 #40045

fhs opened this issue Jul 4, 2020 · 1 comment

Comments

@fhs
Copy link
Contributor

@fhs fhs commented Jul 4, 2020

What version of Go are you using (go version)?

$ go version
go version devel +master Fri Jul 3 01:11:20 EDT 2020 plan9/386

What did you do?

Run:

package main

import (
	"fmt"
	"net"
)

func main() {
	l, err := net.Listen("tcp4", "0.0.0.0:1234")
	if err != nil {
		panic(err)
	}
	defer l.Close()
	fmt.Printf("Listen Addr: %v\n", l.Addr())
}

What did you expect to see?

As seen on Linux:

Listen Addr: 0.0.0.0:1234

What did you see instead?

Listen Addr: [::]:1234

The same issue exists for ListenPacket on udp4.

@gopherbot add labels OS-Plan9, NeedsFix

@gopherbot
Copy link

@gopherbot gopherbot commented Jul 5, 2020

Change https://golang.org/cl/240918 mentions this issue: net: correct address when listening on IPv4zero tcp4/udp4 on Plan 9

@gopherbot gopherbot closed this in c769a47 Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.