add node network to ext. model

This commit is contained in:
Abhishek Kondur 2023-02-04 14:02:33 +04:00
parent 92922f17bd
commit 4deaac5de1
2 changed files with 2 additions and 0 deletions

View file

@ -449,6 +449,7 @@ func GetPeerUpdateForHost(host *models.Host) (models.HostPeerUpdate, error) {
IP: net.ParseIP(node.PrimaryAddress()),
Mask: getCIDRMaskFromAddr(node.PrimaryAddress()),
},
Network: node.PrimaryNetworkRange(),
ExtPeerAddr: net.IPNet{
IP: net.ParseIP(extPeerIdAndAddr.Address),
Mask: getCIDRMaskFromAddr(extPeerIdAndAddr.Address),

View file

@ -54,6 +54,7 @@ type PeerRouteInfo struct {
// ExtClientInfo - struct for ext. client and it's peers
type ExtClientInfo struct {
IngGwAddr net.IPNet `json:"ingress_gw_addr" yaml:"ingress_gw_addr"`
Network net.IPNet `json:"network" yaml:"network"`
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"`