diff --git a/controllers/common.go b/controllers/common.go index 89044fcd8..ad6df1dd4 100644 --- a/controllers/common.go +++ b/controllers/common.go @@ -68,7 +68,7 @@ func GetExtPeersList(networkName string, macaddress string) ([]models.ExtPeersRe ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) //Get all nodes in the relevant network which are NOT in pending state - filter := bson.M{"network": networkName, "gatewayid": macaddress} + filter := bson.M{"network": networkName, "ingressgatewayid": macaddress} cur, err := collection.Find(ctx, filter) if err != nil { diff --git a/controllers/extClientHttpController.go b/controllers/extClientHttpController.go index 97954e2e2..aedaef1e9 100644 --- a/controllers/extClientHttpController.go +++ b/controllers/extClientHttpController.go @@ -207,19 +207,19 @@ func getExtClientConf(w http.ResponseWriter, r *http.Request) { config := fmt.Sprintf(`[Interface] Address = %s PrivateKey = %s -%s [Peer] PublicKey = %s AllowedIPs = %s Endpoint = %s +%s `, extclient.Address + "/32", extclient.PrivateKey, - keepalive, gwnode.PublicKey, network.AddressRange, - gwendpoint) + gwendpoint, + keepalive) if params["type"] == "qr" { bytes, err := qrcode.Encode(config, qrcode.Medium, 220)