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") }