From 6388b9b99d8c7023da276aff1f4194548959cdd4 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 7 Mar 2018 22:36:16 +0000 Subject: [PATCH] Increase the randomly generated port in -genconf to values above 32768 --- yggdrasil.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yggdrasil.go b/yggdrasil.go index 16d44acf..3eedd495 100644 --- a/yggdrasil.go +++ b/yggdrasil.go @@ -113,7 +113,7 @@ func generateConfig(isAutoconf bool) *nodeConfig { cfg.Listen = "[::]:0" } else { r1 := rand.New(rand.NewSource(time.Now().UnixNano())) - cfg.Listen = fmt.Sprintf("[::]:%d", r1.Intn(65534 - 1024) + 1024) + cfg.Listen = fmt.Sprintf("[::]:%d", r1.Intn(65534 - 32768) + 32768) } cfg.AdminListen = "[::1]:9001" cfg.BoxPub = hex.EncodeToString(bpub[:])