Skip to content

syscall: make route_bsd.go 64-bit clean on every netbsd #6226

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

Closed
mikioh opened this issue Aug 23, 2013 · 2 comments
Closed

syscall: make route_bsd.go 64-bit clean on every netbsd #6226

mikioh opened this issue Aug 23, 2013 · 2 comments
Milestone

Comments

@mikioh
Copy link
Contributor

mikioh commented Aug 23, 2013

On 32-bit NetBSD, Addrs of net.Interface or net.InterfaceAddrs never return correct IPv6
interface addresses but 64-bit NetBSD is fine because,

1) I didn't noticed but NetBSD did a cleanup of 64-bit aligned access to routing
facilities
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/net/rtsock.c?rev=1.133&;content-type=text/x-cvsweb-markup&only_with_tag=MAIN

2) On 32-bit systems, sometimes they don't set address families correctly, still we see
AF_UNSPEC in sockaddrs, unlike the 64-bit systems

So, the fix should be;
- 64-bit alignment routing facility access on every NetBSD platforms
- find out and remark preferred address family
@mikioh
Copy link
Contributor Author

mikioh commented Aug 23, 2013

Comment 1:

% uname -a
NetBSD vm3 6.1.1 NetBSD 6.1.1 (GENERIC) i386
% go test -v -run=Interf
=== RUN TestInterfaces
--- PASS: TestInterfaces (0.00 seconds)
        interface_test.go:59: table: len/cap = 2/2
        interface_test.go:76: "wm0": flags "up|broadcast|multicast", ifindex 1, mtu 1500
        interface_test.go:77:   hardware address "..."
        interface_test.go:125:  interface address "<nil>"
        interface_test.go:125:  interface address "<nil>"
        interface_test.go:125:  interface address "172.16.220.13/24"
        interface_test.go:76: "lo0": flags "up|loopback|multicast", ifindex 2, mtu 33192
        interface_test.go:77:   hardware address ""
        interface_test.go:125:  interface address "<nil>"
        interface_test.go:125:  interface address "127.0.0.1/8"
        interface_test.go:125:  interface address "<nil>"
        interface_test.go:125:  interface address "<nil>"
=== RUN TestInterfaceAddrs
--- PASS: TestInterfaceAddrs (0.00 seconds)
        interface_test.go:88: table: len/cap = 7/8
        interface_test.go:125:  interface address "<nil>"
        interface_test.go:125:  interface address "<nil>"
        interface_test.go:125:  interface address "172.16.220.13/24"
        interface_test.go:125:  interface address "<nil>"
        interface_test.go:125:  interface address "127.0.0.1/8"
        interface_test.go:125:  interface address "<nil>"
        interface_test.go:125:  interface address "<nil>"

@mikioh
Copy link
Contributor Author

mikioh commented Aug 24, 2013

Comment 2:

This issue was closed by revision 9a79472.

Status changed to Fixed.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2maybe 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.
Projects
None yet
Development

No branches or pull requests

3 participants