mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-04 08:27:27 +08:00
check host ports on join
This commit is contained in:
@@ -579,6 +579,9 @@ func createNode(w http.ResponseWriter, r *http.Request) {
|
||||
// consume password before hashing for mq client creation
|
||||
hostPassword := data.Host.HostPass
|
||||
data.Node.Server = servercfg.GetServer()
|
||||
if !logic.HostExists(&data.Host) {
|
||||
logic.CheckHostPorts(&data.Host)
|
||||
}
|
||||
if err := logic.CreateHost(&data.Host); err != nil {
|
||||
if errors.Is(err, logic.ErrHostExists) {
|
||||
logger.Log(3, "host exists .. no need to create")
|
||||
|
Reference in New Issue
Block a user