From bf1d69f25b8176030b8a2700d823dc7e2c18e084 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 1 Dec 2021 09:51:12 -0800 Subject: [PATCH] wgengine/monitor: fix docs on Mon.InterfaceState The behavior was changed in March (in 7f174e84e627dc04bc91352e9897f22cf4724191) but that change forgot to update these docs. Change-Id: I79c0301692c1d13a4a26641cc5144baf48ec1360 Signed-off-by: Brad Fitzpatrick --- wgengine/monitor/monitor.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wgengine/monitor/monitor.go b/wgengine/monitor/monitor.go index 4895c390e..e566fc0cf 100644 --- a/wgengine/monitor/monitor.go +++ b/wgengine/monitor/monitor.go @@ -104,8 +104,10 @@ func New(logf logger.Logf) (*Mon, error) { return m, nil } -// InterfaceState returns the state of the machine's network interfaces, -// without any Tailscale ones. +// InterfaceState returns the latest snapshot of the machine's network +// interfaces. +// +// The returned value is owned by Mon; it must not be modified. func (m *Mon) InterfaceState() *interfaces.State { m.mu.Lock() defer m.mu.Unlock()