diff --git a/add.go b/add.go index f620383..46d86f7 100644 --- a/add.go +++ b/add.go @@ -29,6 +29,7 @@ func Add() { PrivateKey: privateKey, // omitted from server config JSON! PresharedKey: GenerateJSONKey(), IP: IP, + Networks: []JSONIPNet{}, } conf.MustAddPeer(peer) diff --git a/configtypes.go b/configtypes.go index 7b172d9..94df0df 100644 --- a/configtypes.go +++ b/configtypes.go @@ -25,7 +25,7 @@ type PeerConfig struct { // TODO ExternalIP support (Endpoint) //ExternalIP net.UDPAddr `validate:"required,udp4_addr"` // TODO support routing additional networks (AllowedIPs) - Networks []JSONIPNet + Networks []JSONIPNet `validate:"required"` } type DsnetConfig struct {