Author: nextgens
Date: 2008-08-14 17:05:38 +0000 (Thu, 14 Aug 2008)
New Revision: 21850
Modified:
trunk/freenet/src/freenet/node/FNPPacketMangler.java
Log:
reinstanciate the size-length check in FNPPacketMangler
Modified: trunk/freenet/src/freenet/node/FNPPacketMangler.java
===================================================================
--- trunk/freenet/src/freenet/node/FNPPacketMangler.java 2008-08-14
16:40:55 UTC (rev 21849)
+++ trunk/freenet/src/freenet/node/FNPPacketMangler.java 2008-08-14
17:05:38 UTC (rev 21850)
@@ -1634,10 +1634,9 @@
*/
private void sendAuthPacket(byte[] output, BlockCipher cipher, PeerNode
pn, Peer replyTo, boolean anonAuth) {
int length = output.length;
- // FIXME shorten seednode phase 3/4 so it's within the limit
-// if(length > sock.getMaxPacketSize()) {
-// throw new IllegalStateException("Cannot send auth
packet: too long: "+length);
-// }
+ if(length > sock.getMaxPacketSize()) {
+ throw new IllegalStateException("Cannot send auth
packet: too long: "+length);
+ }
PCFBMode pcfb = PCFBMode.create(cipher);
byte[] iv = new byte[pcfb.lengthIV()];
node.random.nextBytes(iv);