]> Cypherpunks repositories - gostls13.git/commitdiff
net: revert Zone in IPNet temporally
authorMikio Hara <mikioh.mikioh@gmail.com>
Sun, 17 Mar 2013 10:50:01 +0000 (19:50 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Sun, 17 Mar 2013 10:50:01 +0000 (19:50 +0900)
Update #4501.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7853047

src/pkg/net/interface_bsd.go
src/pkg/net/interface_darwin.go
src/pkg/net/interface_freebsd.go
src/pkg/net/interface_linux.go
src/pkg/net/ip.go

index f58065a85b556448861b0684ff630dc5a50b30f5..716b60a97f4bc25689ee28817494ae4b915cbe71 100644 (file)
@@ -171,7 +171,6 @@ func newAddr(ifi *Interface, m *syscall.InterfaceAddrMessage) (Addr, error) {
                                // the interface index in the interface-local or link-
                                // local address as the kernel-internal form.
                                if ifa.IP.IsLinkLocalUnicast() {
-                                       ifa.Zone = ifi.Name
                                        ifa.IP[2], ifa.IP[3] = 0, 0
                                }
                        }
index 83e483ba20c64a8e6292b136d3e4b99f07678900..a50a7988ee008061fd34e3d5b5628256ef7c6315 100644 (file)
@@ -54,7 +54,6 @@ func newMulticastAddr(ifi *Interface, m *syscall.InterfaceMulticastAddrMessage)
                        // the interface index in the interface-local or link-
                        // local address as the kernel-internal form.
                        if ifma.IP.IsInterfaceLocalMulticast() || ifma.IP.IsLinkLocalMulticast() {
-                               ifma.Zone = ifi.Name
                                ifma.IP[2], ifma.IP[3] = 0, 0
                        }
                        ifmat = append(ifmat, ifma.toAddr())
index 1bf5ae72b83911164feb58615aa2e5c63b4825e5..d547d50b6d2ca114971410c6fee4e869e3d2ad78 100644 (file)
@@ -54,7 +54,6 @@ func newMulticastAddr(ifi *Interface, m *syscall.InterfaceMulticastAddrMessage)
                        // the interface index in the interface-local or link-
                        // local address as the kernel-internal form.
                        if ifma.IP.IsInterfaceLocalMulticast() || ifma.IP.IsLinkLocalMulticast() {
-                               ifma.Zone = ifi.Name
                                ifma.IP[2], ifma.IP[3] = 0, 0
                        }
                        ifmat = append(ifmat, ifma.toAddr())
index e66daef06a068b07f1aaa91a04662fcf4b4c4c2a..1207c0f269da08f20a813512308d8c3211c8fb98 100644 (file)
@@ -156,9 +156,6 @@ func newAddr(ifi *Interface, ifam *syscall.IfAddrmsg, attrs []syscall.NetlinkRou
                        case syscall.AF_INET6:
                                ifa := &IPNet{IP: make(IP, IPv6len), Mask: CIDRMask(int(ifam.Prefixlen), 8*IPv6len)}
                                copy(ifa.IP, a.Value[:])
-                               if ifam.Scope == syscall.RT_SCOPE_HOST || ifam.Scope == syscall.RT_SCOPE_LINK {
-                                       ifa.Zone = ifi.Name
-                               }
                                return ifa
                        }
                }
@@ -229,9 +226,6 @@ func parseProcNetIGMP6(path string, ifi *Interface) []Addr {
                                b[i/2], _ = xtoi2(f[2][i:i+2], 0)
                        }
                        ifma := IPAddr{IP: IP{b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8], b[9], b[10], b[11], b[12], b[13], b[14], b[15]}}
-                       if ifma.IP.IsInterfaceLocalMulticast() || ifma.IP.IsLinkLocalMulticast() {
-                               ifma.Zone = ifi.Name
-                       }
                        ifmat = append(ifmat, ifma.toAddr())
                }
        }
index d588e3a42946c6c2771598e646363e1725e53c74..aee4064161c628a4883563ec65dc69de8240859d 100644 (file)
@@ -36,7 +36,6 @@ type IPMask []byte
 type IPNet struct {
        IP   IP     // network number
        Mask IPMask // network mask
-       Zone string // IPv6 scoped addressing zone
 }
 
 // IPv4 returns the IP address (in 16-byte form) of the