mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-05 20:54:18 +08:00
NET-528: add host static info to peer update (#2550)
* set isstatic field on peer update * remove static check for peer port
This commit is contained in:
parent
a7fce5c3ba
commit
31fcc8cd6d
2 changed files with 3 additions and 0 deletions
|
@ -181,6 +181,7 @@ func GetPeerUpdateForHost(network string, host *models.Host, allNodes []models.N
|
|||
hostPeerUpdate.HostNetworkInfo[peerHost.PublicKey.String()] = models.HostNetworkInfo{
|
||||
Interfaces: peerHost.Interfaces,
|
||||
ListenPort: peerPort,
|
||||
IsStatic: peerHost.IsStatic,
|
||||
}
|
||||
nodePeer = peerConfig
|
||||
} else {
|
||||
|
@ -191,6 +192,7 @@ func GetPeerUpdateForHost(network string, host *models.Host, allNodes []models.N
|
|||
hostPeerUpdate.HostNetworkInfo[peerHost.PublicKey.String()] = models.HostNetworkInfo{
|
||||
Interfaces: peerHost.Interfaces,
|
||||
ListenPort: peerPort,
|
||||
IsStatic: peerHost.IsStatic,
|
||||
}
|
||||
nodePeer = hostPeerUpdate.Peers[peerIndexMap[peerHost.PublicKey.String()]]
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ type HostInfoMap map[string]HostNetworkInfo
|
|||
type HostNetworkInfo struct {
|
||||
Interfaces []Iface `json:"interfaces" yaml:"interfaces"`
|
||||
ListenPort int `json:"listen_port" yaml:"listen_port"`
|
||||
IsStatic bool `json:"is_static"`
|
||||
}
|
||||
|
||||
// PeerMap - peer map for ids and addresses in metrics
|
||||
|
|
Loading…
Add table
Reference in a new issue