From 31721759f3d101d9df821be12310451573182c1d Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 2 Mar 2021 08:15:57 -0800 Subject: [PATCH] wgengine/monitor: don't return nil, nil in darwin monitor We used to allow that, but now it just crashes. Separately I need to figure out why it got into this path at all, which is #1416. Signed-off-by: Brad Fitzpatrick --- wgengine/monitor/monitor_darwin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgengine/monitor/monitor_darwin.go b/wgengine/monitor/monitor_darwin.go index 2ae9c4433..a2397617d 100644 --- a/wgengine/monitor/monitor_darwin.go +++ b/wgengine/monitor/monitor_darwin.go @@ -58,7 +58,7 @@ func (m *darwinRouteMon) Receive() (message, error) { msgs, err := route.ParseRIB(route.RIBTypeRoute, m.buf[:n]) if err != nil { m.logf("read %d bytes (% 02x), failed to parse RIB: %v", n, m.buf[:n], err) - return nil, nil + return unspecifiedMessage{}, nil } if debugRouteMessages { m.logf("read: %d bytes, %d msgs", n, len(msgs))