From e41193ec4d72f9c96066a7cefd663d93334e9593 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 19 Jul 2021 14:30:15 -0700 Subject: [PATCH] wgengine/monitor: don't spam about Linux RTM_NEWRULE events The earlier 2ba36c294b51b672073a36a599a61c758d0ffafa started listening for ip rule changes and only cared about DELRULE events, buts its subscription included all rule events, including new ones, which meant we were then catching our own ip rule creations and logging about how they were unknown. Stop that log spam. Updates #1591 Signed-off-by: Brad Fitzpatrick --- wgengine/monitor/monitor_linux.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wgengine/monitor/monitor_linux.go b/wgengine/monitor/monitor_linux.go index 20d55484a..fa85cf4d4 100644 --- a/wgengine/monitor/monitor_linux.go +++ b/wgengine/monitor/monitor_linux.go @@ -119,6 +119,9 @@ func (c *nlConn) Receive() (message, error) { Dst: dst, Gateway: gw, }, nil + case unix.RTM_NEWRULE: + // Probably ourselves adding it. + return ignoreMessage{}, nil case unix.RTM_DELRULE: // For https://github.com/tailscale/tailscale/issues/1591 where // systemd-networkd deletes our rules.