Skip to content

Commit e68d87e

Browse files
committed
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 <bradfitz@tailscale.com>
1 parent 2cfc96a commit e68d87e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ipn/prefs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,9 +446,9 @@ func (p *Prefs) AdvertisesExitNode() bool {
446446
return v4 && v6
447447
}
448448

449-
// SetRunExitNode mutates p (if non-nil) to add or remove the two
449+
// SetAdvertiseExitNode mutates p (if non-nil) to add or remove the two
450450
// /0 exit node routes.
451-
func (p *Prefs) SetRunExitNode(runExit bool) {
451+
func (p *Prefs) SetAdvertiseExitNode(runExit bool) {
452452
if p == nil {
453453
return
454454
}

ipn/prefs_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -659,18 +659,18 @@ func TestPrefsExitNode(t *testing.T) {
659659
p.AdvertiseRoutes = []netaddr.IPPrefix{
660660
netaddr.MustParseIPPrefix("10.0.0.0/16"),
661661
}
662-
p.SetRunExitNode(true)
662+
p.SetAdvertiseExitNode(true)
663663
if got, want := len(p.AdvertiseRoutes), 3; got != want {
664664
t.Errorf("routes = %d; want %d", got, want)
665665
}
666-
p.SetRunExitNode(true)
666+
p.SetAdvertiseExitNode(true)
667667
if got, want := len(p.AdvertiseRoutes), 3; got != want {
668668
t.Errorf("routes = %d; want %d", got, want)
669669
}
670670
if !p.AdvertisesExitNode() {
671671
t.Errorf("not advertising after enable")
672672
}
673-
p.SetRunExitNode(false)
673+
p.SetAdvertiseExitNode(false)
674674
if p.AdvertisesExitNode() {
675675
t.Errorf("advertising after disable")
676676
}

0 commit comments

Comments
 (0)