mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2024-12-12 09:30:52 +01:00
fixed bug for demo
This commit is contained in:
parent
c91e6e7f68
commit
7e6f2563c7
@ -345,23 +345,24 @@ func (m *WgMeshConfigApplyer) getPeerConfig(params *GetConfigParams) (*wgtypes.C
|
||||
|
||||
peerToClients[pubKey.String()] = append(clients, *n.GetWgHost())
|
||||
|
||||
cfg, err := m.convertMeshNode(convertMeshNodeParams{
|
||||
node: n,
|
||||
self: self,
|
||||
mesh: params.mesh,
|
||||
device: params.dev,
|
||||
peerToClients: peerToClients,
|
||||
routes: params.routes,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if NodeEquals(self, peer) {
|
||||
cfg, err := m.convertMeshNode(convertMeshNodeParams{
|
||||
node: n,
|
||||
self: self,
|
||||
mesh: params.mesh,
|
||||
device: params.dev,
|
||||
peerToClients: peerToClients,
|
||||
routes: params.routes,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
installedRoutes = append(installedRoutes, m.getRoutesToInstall(cfg, params.mesh, n)...)
|
||||
peerConfigs = append(peerConfigs, *cfg)
|
||||
}
|
||||
|
||||
installedRoutes = append(installedRoutes, m.getRoutesToInstall(cfg, params.mesh, n)...)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user