added support for account network

Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
This commit is contained in:
Dmitri Dolguikh
2026-07-29 18:57:08 +02:00
parent e620c86cd4
commit 42ce83a8f3
6 changed files with 76 additions and 4 deletions
+1 -1
View File
@@ -291,7 +291,7 @@ func decodeAccountNetwork(an *proto.AccountNetwork) *nmdata.Network {
n := &nmdata.Network{
Identifier: an.Identifier,
Dns: an.Dns,
Serial: an.Serial,
Serial: int64(an.Serial),
}
if an.NetCidr != "" {
if _, ipnet, err := net.ParseCIDR(an.NetCidr); err == nil && ipnet != nil {
@@ -8,9 +8,9 @@ type Network struct {
Net net.IPNet
NetV6 net.IPNet
Dns string
Serial uint64
Serial int64
}
func (n *Network) CurrentSerial() uint64 {
return n.Serial
return uint64(n.Serial)
}