diff --git a/go.sum b/go.sum index 5d6fef5..53479e4 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,6 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ= diff --git a/init.go b/init.go index 1f01b3f..29f0833 100644 --- a/init.go +++ b/init.go @@ -20,6 +20,7 @@ func Init() { Network: getRandomNetwork(), Peers: make([]PeerConfig, 0), Domain: "dsnet", + ReportFile: DEFAULT_REPORT_FILE, } //fmt.Println(conf.Network.String()) @@ -37,7 +38,7 @@ func getRandomNetwork() JSONIPNet { rand.Read(rbs) return JSONIPNet{ - net.IPNet{ + IPNet: net.IPNet{ net.IP{10, rbs[0], rbs[1] << 2, 0}, net.IPMask{255, 255, 252, 0}, }, diff --git a/types.go b/types.go index 2c614e5..d9d14fd 100644 --- a/types.go +++ b/types.go @@ -54,6 +54,7 @@ type DsnetConfig struct { // resolution. Informational only. Domain string `validate:"required,gte=1,lte=255"` // TODO Default subnets to route via VPN + ReportFile string `validate:"required"` } type Dsnet struct {