forked from extern/smegmesh
81-serparate-procs
- nil dereference again
This commit is contained in:
parent
69b1790bb6
commit
2b73d241b6
@ -107,7 +107,7 @@ func NewCtrlServer(params *NewCtrlServerParams) (*MeshCtrlServer, error) {
|
||||
logging.Log.WriteErrorf(err.Error())
|
||||
}
|
||||
|
||||
return err
|
||||
return nil
|
||||
}, 1)
|
||||
|
||||
heartbeatTimer := lib.NewTimer(func() error {
|
||||
|
@ -234,8 +234,8 @@ func (m *WgMeshConfigApplyer) getClientConfig(params *GetConfigParams) (*wgtypes
|
||||
|
||||
routesForMesh := lib.Map(lib.MapValues(params.routes), func(rns []routeNode) []routeNode {
|
||||
return lib.Filter(rns, func(rn routeNode) bool {
|
||||
_, ipNet, _ := net.ParseCIDR(rn.gateway)
|
||||
return meshNet.Contains(ipNet.IP) || ipNet.Contains(meshNet.IP)
|
||||
node, err := params.mesh.GetNode(rn.gateway)
|
||||
return node != nil && err == nil
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user