mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-07 01:36:23 +08:00
add ingress gw status to peer update
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user