net/netaddr: start migrating to net/netip via new netaddr adapter package

Updates #5162

Change-Id: Id7bdec303b25471f69d542f8ce43805328d56c12
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2022-07-24 20:08:42 -07:00
committed by Brad Fitzpatrick
parent 7b1a91dfd3
commit 7eaf5e509f
191 changed files with 1009 additions and 888 deletions

View File

@@ -7,7 +7,8 @@
package wgcfg
import (
"inet.af/netaddr"
"net/netip"
"tailscale.com/types/key"
)
@@ -32,9 +33,9 @@ func (src *Config) Clone() *Config {
var _ConfigCloneNeedsRegeneration = Config(struct {
Name string
PrivateKey key.NodePrivate
Addresses []netaddr.IPPrefix
Addresses []netip.Prefix
MTU uint16
DNS []netaddr.IP
DNS []netip.Addr
Peers []Peer
}{})
@@ -54,7 +55,7 @@ func (src *Peer) Clone() *Peer {
var _PeerCloneNeedsRegeneration = Peer(struct {
PublicKey key.NodePublic
DiscoKey key.DiscoPublic
AllowedIPs []netaddr.IPPrefix
AllowedIPs []netip.Prefix
PersistentKeepalive uint16
WGEndpoint key.NodePublic
}{})