mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-25 05:27:23 +08:00
add ingress gw status to peer update
This commit is contained in:
parent
cd2d026fc8
commit
04c2039beb
2 changed files with 2 additions and 0 deletions
|
|
@ -290,6 +290,7 @@ func GetPeerUpdateForHost(network string, host *models.Host, allNodes []models.N
|
|||
var egressRoutes []models.EgressNetworkRoutes
|
||||
var extUserIps []net.IP
|
||||
if node.IsIngressGateway {
|
||||
hostPeerUpdate.FwUpdate.IsIngressGw = true
|
||||
extPeers, extPeerIDAndAddrs, egressRoutes, extUserIps, err = GetExtPeers(&node, &node)
|
||||
if err == nil {
|
||||
hostPeerUpdate.FwUpdate.IngressInfo[node.ID.String()] = models.IngressInfo{
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ type KeyUpdate struct {
|
|||
// FwUpdate - struct for firewall updates
|
||||
type FwUpdate struct {
|
||||
IsEgressGw bool `json:"is_egress_gw"`
|
||||
IsIngressGw bool `json:"is_ingress_gw"`
|
||||
EgressInfo map[string]EgressInfo `json:"egress_info"`
|
||||
IngressInfo map[string]IngressInfo `json:"ingress_info"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue