Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(845)

Issue 6816116: code review 6816116: net: support IPv6 scoped addressing zone (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by mikio
Modified:
10 years ago
Reviewers:
rsc, albert.strasheim
CC:
rsc, iant, golang-dev
Visibility:
Public.

Description

net: support IPv6 scoped addressing zone This CL provides IPv6 scoped addressing zone support as defined in RFC 4007 for internet protocol family connection setups. Follwoing types and functions allow a literal IPv6 address with zone identifer as theirs parameter. pkg net, func Dial(string, string) (Conn, error) pkg net, func DialOpt(string, ...DialOption) (Conn, error) pkg net, func DialTimeout(string, string, time.Duration) (Conn, error) pkg net, func Listen(string, string) (Listener, error) pkg net, func ListenPacket(string, string) (PacketConn, error) pkg net, func ResolveIPAddr(string, string) (*IPAddr, error) pkg net, func ResolveTCPAddr(string, string) (*TCPAddr, error) pkg net, func ResolveUDPAddr(string, string) (*UDPAddr, error) pkg net, type IPAddr struct, Zone string pkg net, type TCPAddr struct, Zone string pkg net, type UDPAddr struct, Zone string Also follwoing methods return a literal IPv6 address with zone identifier string if possible. pkg net, method (*IPAddr) String() string pkg net, method (*TCPAddr) String() string pkg net, method (*UDPAddr) String() string Fixes issue 4234. Fixes issue 4501. Update issue 5081.

Patch Set 1 : diff -r f5c69f87ef34 https://code.google.com/p/go #

Patch Set 2 : diff -r f5c69f87ef34 https://code.google.com/p/go #

Patch Set 3 : diff -r fc4e67d82024 https://code.google.com/p/go #

Patch Set 4 : diff -r ceaa16504f36 https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 697f36fec52c https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 027d52134c62 https://go.googlecode.com/hg/ #

Total comments: 4

Patch Set 7 : diff -r 9ca85035f95a https://code.google.com/p/go #

Patch Set 8 : diff -r 9ca85035f95a https://code.google.com/p/go #

Total comments: 2

Patch Set 9 : diff -r 0f3086c49268 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+395 lines, -105 lines) Patch
M src/pkg/net/dial.go View 1 2 3 4 5 6 7 8 3 chunks +18 lines, -11 lines 0 comments Download
M src/pkg/net/interface_test.go View 1 2 3 4 5 6 3 chunks +30 lines, -4 lines 0 comments Download
M src/pkg/net/ip.go View 1 2 3 4 5 6 7 8 8 chunks +42 lines, -51 lines 0 comments Download
M src/pkg/net/ip_test.go View 1 2 3 4 5 6 4 chunks +21 lines, -5 lines 0 comments Download
M src/pkg/net/ipraw_test.go View 1 2 3 4 5 6 3 chunks +21 lines, -0 lines 0 comments Download
M src/pkg/net/iprawsock.go View 1 2 3 4 5 1 chunk +6 lines, -3 lines 0 comments Download
M src/pkg/net/ipsock.go View 1 2 3 4 5 6 5 chunks +40 lines, -21 lines 0 comments Download
M src/pkg/net/tcp_test.go View 1 2 3 4 5 6 4 chunks +100 lines, -0 lines 0 comments Download
M src/pkg/net/tcpsock.go View 1 2 3 4 5 6 1 chunk +9 lines, -5 lines 0 comments Download
M src/pkg/net/udp_test.go View 1 2 3 4 5 6 4 chunks +99 lines, -0 lines 0 comments Download
M src/pkg/net/udpsock.go View 1 2 3 4 5 6 1 chunk +9 lines, -5 lines 0 comments Download

Messages

Total messages: 23
mikio
Hello rsc@golang.org, iant@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
11 years, 4 months ago (2012-11-12 15:38:04 UTC) #1
rsc
I understand that we probably have to do this, but I'm not thrilled about it. ...
11 years, 4 months ago (2012-11-12 21:02:36 UTC) #2
mikio
On Tue, Nov 13, 2012 at 6:02 AM, <rsc@golang.org> wrote: > This is a lot ...
11 years, 4 months ago (2012-11-13 00:32:05 UTC) #3
mikio
Hello rsc@golang.org, iant@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 4 months ago (2012-11-30 16:07:05 UTC) #4
mikio
Hello rsc@golang.org, iant@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 4 months ago (2012-12-01 07:13:19 UTC) #5
rsc
I'm sad this has to happen at all but I understand that the internet says ...
11 years, 3 months ago (2012-12-06 04:43:41 UTC) #6
rsc
Okay, I get that. Thanks. Still, it seems wrong that net.ResolveTCPAddr + net.DialTCP should accept ...
11 years, 3 months ago (2012-12-06 06:18:59 UTC) #7
rsc
> Well, I'm thinking of another option that go.net/ipv6 package > includes own Dial, Listen ...
11 years, 3 months ago (2012-12-06 06:26:14 UTC) #8
mikio
On Thu, Dec 6, 2012 at 3:02 PM, Russ Cox <rsc@golang.org> wrote: > Still, it ...
11 years, 3 months ago (2012-12-06 06:27:01 UTC) #9
mikio
> Why does net.DialTCP accept a scoped addr but net.Dial would not? Because net.DialTCP doesn't ...
11 years, 3 months ago (2012-12-06 06:29:42 UTC) #10
mikio
On Thu, Dec 6, 2012 at 1:43 PM, <rsc@golang.org> wrote: > I'm sad this has ...
11 years, 3 months ago (2012-12-06 06:30:53 UTC) #11
mikio
Fixed suggestions but waiting for a consensus. https://codereview.appspot.com/6816116/diff/10068/src/pkg/net/ip.go File src/pkg/net/ip.go (right): https://codereview.appspot.com/6816116/diff/10068/src/pkg/net/ip.go#newcode622 src/pkg/net/ip.go:622: ip, _ ...
11 years, 3 months ago (2012-12-11 03:28:18 UTC) #12
mikio
ping
11 years, 2 months ago (2013-01-26 03:11:52 UTC) #13
rsc
The code seems okay. I'm still worried about whether we should do this at all ...
11 years, 1 month ago (2013-01-30 17:37:18 UTC) #14
rsc
Please see my recent comments on golang.org/issue/4501. We should move ahead with this, and promptly. ...
11 years ago (2013-03-15 04:38:49 UTC) #15
mikio
On 2013/03/15 04:38:49, rsc wrote: > Please see my recent comments on golang.org/issue/4501. > We ...
11 years ago (2013-03-15 04:46:43 UTC) #16
rsc
How close is this? I'd like to get this in and then declare Zone done ...
11 years ago (2013-03-21 17:49:38 UTC) #17
mikio
Hello rsc@golang.org, iant@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years ago (2013-03-22 11:53:53 UTC) #18
mikio
Sorry for the delay, PTAL. > I'd like to get this in and then declare ...
11 years ago (2013-03-22 11:58:02 UTC) #19
rsc
LGTM This fixes 4501. Thanks very much. https://codereview.appspot.com/6816116/diff/106001/src/pkg/net/dial.go File src/pkg/net/dial.go (right): https://codereview.appspot.com/6816116/diff/106001/src/pkg/net/dial.go#newcode192 src/pkg/net/dial.go:192: // For ...
11 years ago (2013-03-22 14:24:53 UTC) #20
mikio
*** Submitted as https://code.google.com/p/go/source/detail?r=07ed29a4f9f5 *** net: support IPv6 scoped addressing zone This CL provides IPv6 ...
11 years ago (2013-03-23 00:57:48 UTC) #21
albert.strasheim
On 2013/03/23 00:57:48, mikio wrote: > *** Submitted as https://code.google.com/p/go/source/detail?r=07ed29a4f9f5 *** > net: support IPv6 ...
11 years ago (2013-03-25 07:28:50 UTC) #22
mikio
11 years ago (2013-03-25 09:26:46 UTC) #23
Hi Albert,

On Mon, Mar 25, 2013 at 4:28 PM,  <fullung@gmail.com> wrote:

> A recent change to net seems to have broken tests with multiple -cpu
> values.
>
> --- FAIL: TestResolveIPAddr-2 (0.00 seconds)
> ipraw_test.go:66: got &net.IPAddr{IP:net.IP{0xfe, 0x80, 0x0, 0x0, 0x0,
> 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1}, Zone:""};
> expected &net.IPAddr{IP:net.IP{0xfe, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
> 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1}, Zone:"lo"}

I failed to repro it but can you try https://codereview.appspot.com/8011043/ ?
Thanks.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b