mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-13 00:24:31 +08:00
add ingress GW address to route info
This commit is contained in:
parent
5e9798bb05
commit
2ffd3cab72
2 changed files with 5 additions and 0 deletions
|
@ -441,6 +441,10 @@ func GetPeerUpdateForHost(host *models.Host) (models.HostPeerUpdate, error) {
|
|||
}
|
||||
hostPeerUpdate.IngressInfo.ExtPeers[extPeerIdAndAddr.ID] = models.ExtClientInfo{
|
||||
Masquerade: true,
|
||||
IngGwAddr: net.IPNet{
|
||||
IP: net.ParseIP(node.PrimaryAddress()),
|
||||
Mask: net.CIDRMask(32, 32),
|
||||
},
|
||||
ExtPeerAddr: net.IPNet{
|
||||
IP: net.ParseIP(extPeerIdAndAddr.Address),
|
||||
Mask: net.CIDRMask(32, 32),
|
||||
|
|
|
@ -42,6 +42,7 @@ type PeerExtInfo struct {
|
|||
}
|
||||
|
||||
type ExtClientInfo struct {
|
||||
IngGwAddr net.IPNet `json:"ingress_gw_addr" yaml:"ingress_gw_addr"`
|
||||
Masquerade bool `json:"masquerade" yaml:"masquerade"`
|
||||
ExtPeerAddr net.IPNet `json:"ext_peer_addr" yaml:"ext_peer_addr"`
|
||||
ExtPeerKey string `json:"ext_peer_key" yaml:"ext_peer_key"`
|
||||
|
|
Loading…
Add table
Reference in a new issue