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

Issue 13374043: code review 13374043: net: make resolveInternetAddr return a list of addresses (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 7 months ago by mikio
Modified:
10 years, 7 months ago
Reviewers:
capnm, bradfitz
CC:
golang-dev, bradfitz
Visibility:
Public.

Description

net: make resolveInternetAddr return a list of addresses This CL makes resolveInternetAddr return a list of addresses that contain a pair of different address family IP addresses if possible, but doesn't contain any API behavioral changes yet. A simple IP address selection mechanism for Resolve{TCP,UDP,IP}Addr and Dial API still prefers IPv4. This is in preparation for TCP connection setup with fast failover on dual IP stack node as described in RFC 6555. Update issue 3610 Update issue 5267

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

Total comments: 16

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

Total comments: 2

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+317 lines, -62 lines) Patch
M src/pkg/net/dialgoogle_test.go View 1 chunk +25 lines, -0 lines 0 comments Download
M src/pkg/net/ipraw_test.go View 2 chunks +13 lines, -6 lines 0 comments Download
M src/pkg/net/ipsock.go View 1 2 4 chunks +53 lines, -33 lines 0 comments Download
A src/pkg/net/ipsock_test.go View 1 1 chunk +189 lines, -0 lines 0 comments Download
M src/pkg/net/lookup.go View 1 2 4 chunks +11 lines, -11 lines 0 comments Download
M src/pkg/net/tcp_test.go View 2 chunks +13 lines, -6 lines 0 comments Download
M src/pkg/net/udp_test.go View 2 chunks +13 lines, -6 lines 0 comments Download

Messages

Total messages: 21
mikio
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
10 years, 7 months ago (2013-08-30 01:08:14 UTC) #1
bradfitz
Before I even look at this, I note that the subject line doesn't contain a ...
10 years, 7 months ago (2013-08-30 02:57:30 UTC) #2
mikio
changed to "net: make resolveInternetAddr return a short list of IPv4/v6 addresses" On Fri, Aug ...
10 years, 7 months ago (2013-08-30 03:03:33 UTC) #3
bradfitz
why short? I see nothing describing why it's not a long list of addresses. drop ...
10 years, 7 months ago (2013-08-30 03:10:05 UTC) #4
bradfitz
https://codereview.appspot.com/13374043/diff/17001/src/pkg/net/ipsock.go File src/pkg/net/ipsock.go (right): https://codereview.appspot.com/13374043/diff/17001/src/pkg/net/ipsock.go#newcode63 src/pkg/net/ipsock.go:63: // firstFavoriteAddr returns an address or a list of ...
10 years, 7 months ago (2013-08-30 03:11:45 UTC) #5
mikio
On Fri, Aug 30, 2013 at 12:10 PM, Brad Fitzpatrick <bradfitz@golang.org> wrote: > why short? ...
10 years, 7 months ago (2013-08-30 03:19:38 UTC) #6
mikio
ptal
10 years, 7 months ago (2013-08-30 03:20:41 UTC) #7
bradfitz
Please see all the comments.
10 years, 7 months ago (2013-08-30 03:24:58 UTC) #8
bradfitz
https://codereview.appspot.com/13374043/diff/17001/src/pkg/net/ipsock.go File src/pkg/net/ipsock.go (right): https://codereview.appspot.com/13374043/diff/17001/src/pkg/net/ipsock.go#newcode65 src/pkg/net/ipsock.go:65: func firstFavoriteAddr(filter func(IP) IP, ips []IP, inetaddr func(IP) netaddr) ...
10 years, 7 months ago (2013-08-30 03:27:17 UTC) #9
mikio
On Fri, Aug 30, 2013 at 12:27 PM, <bradfitz@golang.org> wrote: > What if the order ...
10 years, 7 months ago (2013-08-30 03:32:55 UTC) #10
bradfitz
Let me know when it's ready and you've seen the comments from lookup.go. I'll be ...
10 years, 7 months ago (2013-08-30 03:46:30 UTC) #11
mikio
Hello golang-dev@googlegroups.com, bradfitz@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
10 years, 7 months ago (2013-08-30 05:30:39 UTC) #12
mikio
No pls hold On Fri, Aug 30, 2013 at 2:30 PM, <mikioh.mikioh@gmail.com> wrote: > Hello ...
10 years, 7 months ago (2013-08-30 05:33:32 UTC) #13
mikio
PTAL https://codereview.appspot.com/13374043/diff/17001/src/pkg/net/ipsock.go File src/pkg/net/ipsock.go (right): https://codereview.appspot.com/13374043/diff/17001/src/pkg/net/ipsock.go#newcode63 src/pkg/net/ipsock.go:63: // firstFavoriteAddr returns an address or a list ...
10 years, 7 months ago (2013-08-30 05:54:53 UTC) #14
bradfitz
https://codereview.appspot.com/13374043/diff/17001/src/pkg/net/lookup.go File src/pkg/net/lookup.go (right): https://codereview.appspot.com/13374043/diff/17001/src/pkg/net/lookup.go#newcode24 src/pkg/net/lookup.go:24: // LookupHost looks up the given host using the ...
10 years, 7 months ago (2013-08-30 16:19:58 UTC) #15
mikio
PTAL okay, fighting against diff doesn't make sense. https://codereview.appspot.com/13374043/diff/17001/src/pkg/net/lookup.go File src/pkg/net/lookup.go (right): https://codereview.appspot.com/13374043/diff/17001/src/pkg/net/lookup.go#newcode24 src/pkg/net/lookup.go:24: // ...
10 years, 7 months ago (2013-08-30 23:47:15 UTC) #16
mikio
PTAL okay, fighting against diff doesn't make sense.
10 years, 7 months ago (2013-08-30 23:47:16 UTC) #17
bradfitz
LGTM On Fri, Aug 30, 2013 at 4:47 PM, <mikioh.mikioh@gmail.com> wrote: > PTAL > > ...
10 years, 7 months ago (2013-08-31 00:40:32 UTC) #18
mikio
*** Submitted as https://code.google.com/p/go/source/detail?r=ad8278144324 *** net: make resolveInternetAddr return a list of addresses This CL ...
10 years, 7 months ago (2013-08-31 01:29:21 UTC) #19
capnm
On 2013/08/31 01:29:21, mikio wrote: > *** Submitted as https://code.google.com/p/go/source/detail?r=ad8278144324 *** > > net: make ...
10 years, 7 months ago (2013-09-02 07:33:57 UTC) #20
mikio
10 years, 7 months ago (2013-09-02 07:48:35 UTC) #21
fixed.
https://code.google.com/p/go/source/detail?r=99056a2a8a9d04a860ab4c40ca1470c6...

On Mon, Sep 2, 2013 at 4:33 PM,  <capnm9@gmail.com> wrote:
> On 2013/08/31 01:29:21, mikio wrote:
>>
>> *** Submitted as
>
> https://code.google.com/p/go/source/detail?r=ad8278144324 ***
>
>> net: make resolveInternetAddr return a list of addresses
>
>
>> This CL makes resolveInternetAddr return a list of addresses that
>> contain a pair of different address family IP addresses if possible,
>> but doesn't contain any API behavioral changes yet. A simple IP
>> address selection mechanism for Resolve{TCP,UDP,IP}Addr and Dial API
>> still prefers IPv4.
>
>
>> This is in preparation for TCP connection setup with fast failover on
>> dual IP stack node as described in RFC 6555.
>
>
>> Update issue 3610
>> Update issue 5267
>
>
>> R=golang-dev, bradfitz
>> CC=golang-dev
>> https://codereview.appspot.com/13374043
>
>
> This broke the build for kernels without IPv6 support:
> http://build.golang.org/log/fbed7e3a3a0651f7141b3420116d97cd5092adc0
>
> --- FAIL: TestFirstFavoriteAddr (0.00 seconds)
>         ipsock_test.go:186: #0: got 127.0.0.1:5682; expected [127.0.0.1:5682
> [::1]:5682]
>         ipsock_test.go:186: #1: got 127.0.0.1:5682; expected [127.0.0.1:5682
> [::1]:5682]
>         ipsock_test.go:183: #3: got no suitable address found; expected
> <nil>
>         ipsock_test.go:186: #3: got <nil>; expected [::1]:5682
>         ipsock_test.go:186: #4: got 127.0.0.1:5682; expected [127.0.0.1:5682
> [::1]:5682]
>         ipsock_test.go:186: #5: got 127.0.0.1:5682; expected [127.0.0.1:5682
> [::1]:5682]
>         ipsock_test.go:186: #6: got 127.0.0.1:5682; expected [127.0.0.1:5682
> [::1]:5682]
>         ipsock_test.go:186: #7: got 127.0.0.1:5682; expected [127.0.0.1:5682
> [::1]:5682]
>         ipsock_test.go:183: #10: got no suitable address found; expected
> <nil>
>         ipsock_test.go:186: #10: got <nil>; expected [::1]:5682
>         ipsock_test.go:183: #11: got no suitable address found; expected
> <nil>
>         ipsock_test.go:186: #11: got <nil>; expected [::1]:5682
> FAIL
> FAIL    net     4.618s
>
>
> https://codereview.appspot.com/13374043/
Sign in to reply to this message.

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