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

Issue 7511043: code review 7511043: net: use original raddr if getpeername fails (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by TylerB
Modified:
12 years, 2 months ago
Reviewers:
CC:
dave_cheney.net, mikio, rsc, golang-dev
Visibility:
Public.

Description

net: use original raddr if getpeername fails In sock_posix.go:socket, check if the Getpeername returned nil. If it did, use the raddr that was passed to socket(). Fixes issue 3838.

Patch Set 1 #

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

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

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

Patch Set 5 : diff -r a69d9442029e https://code.google.com/p/go #

Patch Set 6 : diff -r fa13899da667 https://code.google.com/p/go #

Total comments: 1

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

Total comments: 9

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -0 lines) Patch
M src/pkg/net/ipraw_test.go View 1 2 3 4 5 6 7 1 chunk +16 lines, -0 lines 0 comments Download
M src/pkg/net/sock_posix.go View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 21
TylerB
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
12 years, 2 months ago (2013-03-06 16:02:56 UTC) #1
dave_cheney.net
On 2013/03/06 16:02:56, TylerB wrote: > Hello mailto:golang-dev@googlegroups.com, > > I'd like you to review ...
12 years, 2 months ago (2013-03-06 18:14:33 UTC) #2
TylerB
I'm not certain how to write a test for this issue. I'll take a look ...
12 years, 2 months ago (2013-03-06 18:20:58 UTC) #3
TylerB
Hello golang-dev@googlegroups.com, dave@cheney.net (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 2 months ago (2013-03-06 18:42:09 UTC) #4
mikio
I think we need not only for IPConn but UnixConn, considerations for both sides initiator ...
12 years, 2 months ago (2013-03-07 02:08:32 UTC) #5
TylerB
On 2013/03/07 02:08:32, mikio wrote: > I think we need not only for IPConn but ...
12 years, 2 months ago (2013-03-07 20:00:55 UTC) #6
mikio
> I assume that would be in unixsock_posix.go? I'd like to prefer more generic solution ...
12 years, 2 months ago (2013-03-08 00:15:48 UTC) #7
TylerB
Hello golang-dev@googlegroups.com, dave@cheney.net, mikioh.mikioh@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 2 months ago (2013-03-11 19:18:54 UTC) #8
rsc
leaving for mikio. thanks. https://codereview.appspot.com/7511043/diff/17001/src/pkg/net/ipraw_test.go File src/pkg/net/ipraw_test.go (right): https://codereview.appspot.com/7511043/diff/17001/src/pkg/net/ipraw_test.go#newcode350 src/pkg/net/ipraw_test.go:350: if result.RemoteAddr() == nil { ...
12 years, 2 months ago (2013-03-11 20:59:28 UTC) #9
TylerB
On 2013/03/11 20:59:28, rsc wrote: > src/pkg/net/ipraw_test.go:350: if result.RemoteAddr() == nil { > You know ...
12 years, 2 months ago (2013-03-11 21:12:29 UTC) #10
mikio
Do you plan to add test cases for UnixConn and UDPConn? https://codereview.appspot.com/7511043/diff/23001/src/pkg/net/ipraw_test.go File src/pkg/net/ipraw_test.go (right): ...
12 years, 2 months ago (2013-03-12 00:04:19 UTC) #11
TylerB
I don't seem to be able to view your comments. The site says "error: old ...
12 years, 2 months ago (2013-03-12 00:17:20 UTC) #12
mikio
On Tue, Mar 12, 2013 at 8:17 AM, <tylerbunnell@gmail.com> wrote: > I don't seem to ...
12 years, 2 months ago (2013-03-12 00:21:57 UTC) #13
TylerB
On 2013/03/12 00:21:57, mikio wrote: > Actually me, not sure what's going on at backyard. ...
12 years, 2 months ago (2013-03-12 00:36:20 UTC) #14
mikio
and, https://codereview.appspot.com/7511043/diff/23001/src/pkg/net/ipraw_test.go File src/pkg/net/ipraw_test.go (right): https://codereview.appspot.com/7511043/diff/23001/src/pkg/net/ipraw_test.go#newcode351 src/pkg/net/ipraw_test.go:351: defer c.Close()
12 years, 2 months ago (2013-03-12 00:47:42 UTC) #15
TylerB
I'm not entirely certain how to write a good test for DialUnix. With DialIP, even ...
12 years, 2 months ago (2013-03-12 01:15:25 UTC) #16
rsc
Given that the fix is so general, a test of just the easiest specific protocol ...
12 years, 2 months ago (2013-03-12 03:14:19 UTC) #17
mikio
On Tue, Mar 12, 2013 at 9:15 AM, <tylerbunnell@gmail.com> wrote: > I'm not entirely certain ...
12 years, 2 months ago (2013-03-12 23:23:15 UTC) #18
TylerB
On 2013/03/12 23:23:15, mikio wrote: > Hm, perhaps you need to run test w/ "unixgram" ...
12 years, 2 months ago (2013-03-13 01:48:37 UTC) #19
rsc
LGTM
12 years, 2 months ago (2013-03-13 18:49:02 UTC) #20
rsc
12 years, 2 months ago (2013-03-13 18:49:29 UTC) #21
*** Submitted as https://code.google.com/p/go/source/detail?r=a55e2bc546c4 ***

net: use original raddr if getpeername fails

Fixes issue 3838.

R=dave, mikioh.mikioh, rsc
CC=golang-dev
https://codereview.appspot.com/7511043

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

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