From 166fe3fb1220cc3cc35e65719d17d33d4d9e6bd5 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 18 Jan 2022 14:03:14 -0800 Subject: [PATCH] wgengine/netstack: add missing error logging in a RST case Updates #2642 Change-Id: I9f2f8fd28fc980208b0739eb9caf9db7b0977c09 Signed-off-by: Brad Fitzpatrick --- wgengine/netstack/netstack.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wgengine/netstack/netstack.go b/wgengine/netstack/netstack.go index 9c30185f0..268c82bfc 100644 --- a/wgengine/netstack/netstack.go +++ b/wgengine/netstack/netstack.go @@ -538,7 +538,7 @@ func (ns *Impl) acceptTCP(r *tcp.ForwarderRequest) { clientRemoteIP := netaddrIPFromNetstackIP(reqDetails.RemoteAddress) if !clientRemoteIP.IsValid() { ns.logf("invalid RemoteAddress in TCP ForwarderRequest: %s", stringifyTEI(reqDetails)) - r.Complete(true) + r.Complete(true) // sends a RST return } @@ -554,7 +554,8 @@ func (ns *Impl) acceptTCP(r *tcp.ForwarderRequest) { var wq waiter.Queue ep, err := r.CreateEndpoint(&wq) if err != nil { - r.Complete(true) + ns.logf("CreateEndpoint error for %s: %v", stringifyTEI(reqDetails), err) + r.Complete(true) // sends a RST return } r.Complete(false)