added inform port change util func

This commit is contained in:
0xdcarns
2022-07-07 09:52:20 -04:00
parent c481f27200
commit 5fc73e6a80
4 changed files with 13 additions and 4 deletions

View File

@@ -10,6 +10,7 @@ import (
"net"
"net/http"
"os"
"strconv"
"strings"
"github.com/gravitl/netmaker/logger"
@@ -409,3 +410,11 @@ func SetServerInfo(cfg *config.ClientConfig) error {
return nil
}
func informPortChange(node *models.Node) {
if node.ListenPort == 0 {
logger.Log(0, "UDP hole punching enabled")
} else {
logger.Log(0, "using port", strconv.Itoa(int(node.ListenPort)))
}
}