mirror of
https://github.com/gravitl/netmaker.git
synced 2025-12-17 16:18:34 +08:00
fix merger errors
This commit is contained in:
parent
fda691836e
commit
b10ce2da14
1 changed files with 8 additions and 8 deletions
|
|
@ -1508,6 +1508,10 @@ func getUserRemoteAccessGwsV1(w http.ResponseWriter, r *http.Request) {
|
||||||
if !ok {
|
if !ok {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
host, err := logic.GetHost(node.HostID.String())
|
||||||
|
if err != nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
var gwClient models.ExtClient
|
var gwClient models.ExtClient
|
||||||
var found bool
|
var found bool
|
||||||
|
|
@ -1531,19 +1535,19 @@ func getUserRemoteAccessGwsV1(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
gws := userGws[node.Network]
|
gws := userGws[node.Network]
|
||||||
|
|
||||||
logic.SetDNSOnWgConfig(&node, &extClient)
|
logic.SetDNSOnWgConfig(&node, &gwClient)
|
||||||
|
|
||||||
extClient.IngressGatewayEndpoint = utils.GetExtClientEndpoint(
|
gwClient.IngressGatewayEndpoint = utils.GetExtClientEndpoint(
|
||||||
host.EndpointIP,
|
host.EndpointIP,
|
||||||
host.EndpointIPv6,
|
host.EndpointIPv6,
|
||||||
logic.GetPeerListenPort(host),
|
logic.GetPeerListenPort(host),
|
||||||
)
|
)
|
||||||
extClient.AllowedIPs = logic.GetExtclientAllowedIPs(extClient)
|
gwClient.AllowedIPs = logic.GetExtclientAllowedIPs(gwClient)
|
||||||
gw := models.UserRemoteGws{
|
gw := models.UserRemoteGws{
|
||||||
GwID: node.ID.String(),
|
GwID: node.ID.String(),
|
||||||
GWName: host.Name,
|
GWName: host.Name,
|
||||||
Network: node.Network,
|
Network: node.Network,
|
||||||
GwClient: extClient,
|
GwClient: gwClient,
|
||||||
Connected: true,
|
Connected: true,
|
||||||
IsInternetGateway: node.IsInternetGateway,
|
IsInternetGateway: node.IsInternetGateway,
|
||||||
GwPeerPublicKey: host.PublicKey.String(),
|
GwPeerPublicKey: host.PublicKey.String(),
|
||||||
|
|
@ -1573,10 +1577,6 @@ func getUserRemoteAccessGwsV1(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
host, err := logic.GetHost(node.HostID.String())
|
|
||||||
if err != nil {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
network, err := logic.GetNetwork(node.Network)
|
network, err := logic.GetNetwork(node.Network)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error("failed to get node network", "error", err)
|
slog.Error("failed to get node network", "error", err)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue