mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-13 08:34:44 +08:00
review comments
This commit is contained in:
parent
dc58c2c637
commit
5423a458c3
2 changed files with 7 additions and 1 deletions
|
@ -327,6 +327,13 @@ func CheckHostPorts(h *models.Host) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, host := range hosts {
|
for _, host := range hosts {
|
||||||
|
if host.ID == h.ID {
|
||||||
|
//skip self
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if !host.EndpointIP.Equal(h.EndpointIP) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
portsInUse[host.ListenPort] = true
|
portsInUse[host.ListenPort] = true
|
||||||
portsInUse[host.ProxyListenPort] = true
|
portsInUse[host.ProxyListenPort] = true
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,6 @@ type Host struct {
|
||||||
Debug bool `json:"debug" yaml:"debug"`
|
Debug bool `json:"debug" yaml:"debug"`
|
||||||
ListenPort int `json:"listenport" yaml:"listenport"`
|
ListenPort int `json:"listenport" yaml:"listenport"`
|
||||||
PublicListenPort int `json:"public_listen_port" yaml:"public_listen_port"`
|
PublicListenPort int `json:"public_listen_port" yaml:"public_listen_port"`
|
||||||
LocalListenPort int `json:"locallistenport" yaml:"locallistenport"`
|
|
||||||
ProxyListenPort int `json:"proxy_listen_port" yaml:"proxy_listen_port"`
|
ProxyListenPort int `json:"proxy_listen_port" yaml:"proxy_listen_port"`
|
||||||
MTU int `json:"mtu" yaml:"mtu"`
|
MTU int `json:"mtu" yaml:"mtu"`
|
||||||
PublicKey wgtypes.Key `json:"publickey" yaml:"publickey"`
|
PublicKey wgtypes.Key `json:"publickey" yaml:"publickey"`
|
||||||
|
|
Loading…
Add table
Reference in a new issue