Removed interface manipulation via os.Exec into

rtnetlink calls
This commit is contained in:
Tim Beatham
2023-11-07 19:48:53 +00:00
parent 4c19ebd81f
commit 1a864b7c80
15 changed files with 618 additions and 99 deletions

View File

@ -30,6 +30,10 @@ func (n *IpcHandler) CreateMesh(args *ipc.NewMeshArgs, reply *string) error {
Endpoint: args.Endpoint,
})
if err != nil {
return err
}
*reply = meshId
return err
}
@ -122,6 +126,7 @@ func (n *IpcHandler) GetMesh(meshId string, reply *ipc.GetMeshReply) error {
if mesh == nil {
return errors.New("mesh does not exist")
}
nodes := make([]ctrlserver.MeshNode, len(meshSnapshot.GetNodes()))
i := 0