wgengine/netstack: add missing error logging in a RST case

Updates #2642

Change-Id: I9f2f8fd28fc980208b0739eb9caf9db7b0977c09
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/3768/head
Brad Fitzpatrick 3 years ago committed by Brad Fitzpatrick
parent 6be48dfcc6
commit 166fe3fb12

@ -538,7 +538,7 @@ func (ns *Impl) acceptTCP(r *tcp.ForwarderRequest) {
clientRemoteIP := netaddrIPFromNetstackIP(reqDetails.RemoteAddress) clientRemoteIP := netaddrIPFromNetstackIP(reqDetails.RemoteAddress)
if !clientRemoteIP.IsValid() { if !clientRemoteIP.IsValid() {
ns.logf("invalid RemoteAddress in TCP ForwarderRequest: %s", stringifyTEI(reqDetails)) ns.logf("invalid RemoteAddress in TCP ForwarderRequest: %s", stringifyTEI(reqDetails))
r.Complete(true) r.Complete(true) // sends a RST
return return
} }
@ -554,7 +554,8 @@ func (ns *Impl) acceptTCP(r *tcp.ForwarderRequest) {
var wq waiter.Queue var wq waiter.Queue
ep, err := r.CreateEndpoint(&wq) ep, err := r.CreateEndpoint(&wq)
if err != nil { if err != nil {
r.Complete(true) ns.logf("CreateEndpoint error for %s: %v", stringifyTEI(reqDetails), err)
r.Complete(true) // sends a RST
return return
} }
r.Complete(false) r.Complete(false)

Loading…
Cancel
Save