net/dns, ipn/ipnlocal: fix regressions from change moving away from deephash
I got sidetracked apparently and never finished writing this Clone
code in 316afe7d02 (#17448). (It really should use views instead.)
And then I missed one of the users of "routerChanged" that was broken up
into "routerChanged" vs "dnsChanged".
This broke integration tests elsewhere.
Fixes #17506
Change-Id: I533bf0fcf3da9ac6eb4a6cdef03b8df2c1fb4c8e
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
7edb5b7d43
commit
f270c3158a
@@ -17,7 +17,7 @@ type EqualCloner[T any] interface {
|
||||
//
|
||||
// It only modifies *old if they are different. old must be non-nil.
|
||||
func Update[T EqualCloner[T]](old *T, new T) (changed bool) {
|
||||
if new.Equal(*old) {
|
||||
if (*old).Equal(new) {
|
||||
return false
|
||||
}
|
||||
*old = new.Clone()
|
||||
|
||||
Reference in New Issue
Block a user