Browse Source

add wg address to proxy payload

Abhishek Kondur 2 years ago
parent
commit
015bd5d366
1 changed files with 5 additions and 0 deletions
  1. 5 0
      logic/peers.go

+ 5 - 0
logic/peers.go

@@ -154,6 +154,11 @@ func GetPeersForProxy(node *models.Node, onlyPeers bool) (manager.ManagerPayload
 	}
 
 	proxyPayload.IsIngress = node.IsIngressGateway == "yes"
+	addr := node.Address
+	if addr == "" {
+		addr = node.Address6
+	}
+	proxyPayload.WgAddr = addr
 	proxyPayload.Peers = peers
 	proxyPayload.PeerMap = peerConfMap
 	proxyPayload.InterfaceName = node.Interface