From a29b0cf55f720637363f4584e591df1a3f42a662 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Wed, 21 Apr 2021 12:21:15 -0700 Subject: [PATCH] wgengine/wglog: allow wireguard-go receive routines to log I've spent two days searching for a theoretical wireguard-go bug around receive functions exiting early. I've found many bugs, but none of the flavor we're looking for. Restore wireguard-go's logging around starting and stopping receive functions, so that we can definitively rule in or out this particular theory. Signed-off-by: Josh Bleecher Snyder --- wgengine/wglog/wglog.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgengine/wglog/wglog.go b/wgengine/wglog/wglog.go index a0df94a75..fc10de66a 100644 --- a/wgengine/wglog/wglog.go +++ b/wgengine/wglog/wglog.go @@ -31,7 +31,7 @@ func NewLogger(logf logger.Logf) *Logger { wrapper := func(format string, args ...interface{}) { msg := fmt.Sprintf(format, args...) - if strings.Contains(msg, "Routine:") { + if strings.Contains(msg, "Routine:") && !strings.Contains(msg, "receive incoming") { // wireguard-go logs as it starts and stops routines. // Drop those; there are a lot of them, and they're just noise. return