36-add-route-path-into-route-object

Added the route path into the route object so that we can
see what meshes packets are routed across.
This commit is contained in:
Tim Beatham
2023-11-27 18:55:41 +00:00
parent 3fca49a1c9
commit d8e156f13f
12 changed files with 88 additions and 133 deletions

View File

@ -152,8 +152,11 @@ func (n *IpcHandler) GetMesh(meshId string, reply *ipc.GetMeshReply) error {
PublicKey: pubKey.String(),
WgHost: node.GetWgHost().String(),
Timestamp: node.GetTimeStamp(),
Routes: lib.Map(node.GetRoutes(), func(r mesh.Route) string {
return r.GetDestination().String()
Routes: lib.Map(node.GetRoutes(), func(r mesh.Route) ctrlserver.MeshRoute {
return ctrlserver.MeshRoute{
Destination: r.GetDestination().String(),
Path: r.GetPath(),
}
}),
Description: node.GetDescription(),
Alias: node.GetAlias(),