diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index 621ad7888..e0c85548e 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -651,9 +651,7 @@ func (b *LocalBackend) consumeEventbusTopics() { // Whether or not routes should be stored can change over time. shouldStoreRoutes := b.ControlKnobs().AppCStoreRoutes.Load() if shouldStoreRoutes { - // TODO(creachdadair, 2025-09-13): This is a pointer for historical - // reasons, which should go away along with the callback. - if err := b.storeRouteInfo(&ri); err != nil { + if err := b.storeRouteInfo(ri); err != nil { b.logf("appc: failed to store route info: %v", err) } } @@ -7414,7 +7412,7 @@ func namespaceKeyForCurrentProfile(pm *profileManager, key ipn.StateKey) ipn.Sta const routeInfoStateStoreKey ipn.StateKey = "_routeInfo" -func (b *LocalBackend) storeRouteInfo(ri *appc.RouteInfo) error { +func (b *LocalBackend) storeRouteInfo(ri appc.RouteInfo) error { b.mu.Lock() defer b.mu.Unlock() if b.pm.CurrentProfile().ID() == "" { diff --git a/ipn/ipnlocal/local_test.go b/ipn/ipnlocal/local_test.go index a18271d76..e547f1e59 100644 --- a/ipn/ipnlocal/local_test.go +++ b/ipn/ipnlocal/local_test.go @@ -2534,7 +2534,7 @@ func TestBackfillAppConnectorRoutes(t *testing.T) { // Store the test IP in profile data, but not in Prefs.AdvertiseRoutes. b.ControlKnobs().AppCStoreRoutes.Store(true) - if err := b.storeRouteInfo(&appc.RouteInfo{ + if err := b.storeRouteInfo(appc.RouteInfo{ Domains: map[string][]netip.Addr{ "example.com": {ip}, }, @@ -5485,10 +5485,10 @@ func TestReadWriteRouteInfo(t *testing.T) { b.pm.currentProfile = prof1.View() // set up routeInfo - ri1 := &appc.RouteInfo{} + ri1 := appc.RouteInfo{} ri1.Wildcards = []string{"1"} - ri2 := &appc.RouteInfo{} + ri2 := appc.RouteInfo{} ri2.Wildcards = []string{"2"} // read before write