SD: returns ErrNoPaths if no paths were found
Fixes
@@ -159,6 +159,9 @@ func (f *fetcherHandler) GetPaths(ctx context.Context, req *sciond.PathReq,
if err != nil {
return f.buildSCIONDReply(nil, 0, sciond.ErrorInternal), err
}
+ if len(paths) == 0 {
+ return f.buildSCIONDReply(nil, req.MaxPaths, sciond.ErrorNoPaths), nil
+ }
return f.buildSCIONDReply(paths, req.MaxPaths, sciond.ErrorOk), nil
}
