From e68d87eb442e507cf78d27afd6d484a1fcd2d1f0 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 6 Jan 2022 16:17:00 -0800 Subject: [PATCH] ipn: rename SetRunExitNode to SetAdvertiseExitNode From Maisem's code review feedback where he mashed the merge button by mistake. Change-Id: I55abce036a6c25dc391250514983125dda10126c Signed-off-by: Brad Fitzpatrick --- ipn/prefs.go | 4 ++-- ipn/prefs_test.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ipn/prefs.go b/ipn/prefs.go index 297d94d2e..275edf3ba 100644 --- a/ipn/prefs.go +++ b/ipn/prefs.go @@ -446,9 +446,9 @@ func (p *Prefs) AdvertisesExitNode() bool { return v4 && v6 } -// SetRunExitNode mutates p (if non-nil) to add or remove the two +// SetAdvertiseExitNode mutates p (if non-nil) to add or remove the two // /0 exit node routes. -func (p *Prefs) SetRunExitNode(runExit bool) { +func (p *Prefs) SetAdvertiseExitNode(runExit bool) { if p == nil { return } diff --git a/ipn/prefs_test.go b/ipn/prefs_test.go index 23bc4f31f..ee0fc5443 100644 --- a/ipn/prefs_test.go +++ b/ipn/prefs_test.go @@ -659,18 +659,18 @@ func TestPrefsExitNode(t *testing.T) { p.AdvertiseRoutes = []netaddr.IPPrefix{ netaddr.MustParseIPPrefix("10.0.0.0/16"), } - p.SetRunExitNode(true) + p.SetAdvertiseExitNode(true) if got, want := len(p.AdvertiseRoutes), 3; got != want { t.Errorf("routes = %d; want %d", got, want) } - p.SetRunExitNode(true) + p.SetAdvertiseExitNode(true) if got, want := len(p.AdvertiseRoutes), 3; got != want { t.Errorf("routes = %d; want %d", got, want) } if !p.AdvertisesExitNode() { t.Errorf("not advertising after enable") } - p.SetRunExitNode(false) + p.SetAdvertiseExitNode(false) if p.AdvertisesExitNode() { t.Errorf("advertising after disable") }