Tunnels: Add check for prop. 157 layer enc. type

This commit is contained in:
zzz
2021-07-20 10:44:38 -04:00
parent 6b2a4a8fda
commit 3244fe1b0f

View File

@@ -803,6 +803,16 @@ class BuildHandler implements Runnable {
//if ( (response == 0) && (_context.random().nextInt(50) <= 1) )
// response = TunnelHistory.TUNNEL_REJECT_PROBABALISTIC_REJECT;
if (response == 0) {
// only in short build request, otherwise 0
int type = req.readLayerEncryptionType();
if (type != 0) {
if (_log.shouldWarn())
_log.warn("Unsupported layer enc. type: " + type);
response = TunnelHistory.TUNNEL_REJECT_BANDWIDTH;
}
}
long recvDelay = now - state.recvTime;
if (response == 0) {