Router: Validate tunnel ID in requests

Fix max ID
This commit is contained in:
zzz
2018-03-07 18:06:46 +00:00
parent ceac733b66
commit 7433eeb5c0
5 changed files with 16 additions and 6 deletions

View File

@ -161,7 +161,7 @@ public class FragmentTest {
_context.random().nextBytes(toRouter.getData());
}
if (includeTunnel)
toTunnel = new TunnelId(_context.random().nextLong(TunnelId.MAX_ID_VALUE));
toTunnel = new TunnelId(1 + _context.random().nextLong(TunnelId.MAX_ID_VALUE));
return new PendingGatewayMessage(m, toRouter, toTunnel);
}