* Matthew Toseland <toad at amphibian.dyndns.org> [2008-08-06 16:36:20]:

> On Wednesday 06 August 2008 14:53, nextgens at freenetproject.org wrote:
> > Author: nextgens
> > Date: 2008-08-06 13:53:08 +0000 (Wed, 06 Aug 2008)
> > New Revision: 21631
> > 
> > Modified:
> >    trunk/freenet/src/freenet/node/PeerNode.java
> > Log:
> > bugfix related to bug #1933
> > 
> > Modified: trunk/freenet/src/freenet/node/PeerNode.java
> > ===================================================================
> > --- trunk/freenet/src/freenet/node/PeerNode.java    2008-08-06 10:55:32 UTC 
> (rev 21630)
> > +++ trunk/freenet/src/freenet/node/PeerNode.java    2008-08-06 13:53:08 UTC 
> (rev 21631)
> > @@ -2256,6 +2256,8 @@
> >                     length -= 4;
> >                     group = Global.getGroup(groupIndex);
> >                     if(group == null) throw new FSParseException("Unknown 
> > group 
> number "+groupIndex);
> > +                   if(logMINOR)
> > +                           Logger.minor(PeerNode.class, "DSAGroup set 
> to "+group.fingerprintToString()+ " using the group-index "+groupIndex);
> >             }
> >             // Is it compressed?
> >             if((firstByte & 1) == 1) {
> > @@ -2285,7 +2287,8 @@
> >                     }
> >             }
> >             if(logMINOR)
> > -                   Logger.minor(PeerNode.class, "Reference: " + new 
> > String(data, offset, 
> length) + '(' + length + ')');
> > +                   Logger.minor(PeerNode.class, "Reference: " + 
> > HexUtil.bytesToHex(data, 
> offset, length) + '(' + length + ')');
> > +
> >             // Now decode it
> >             ByteArrayInputStream bais = new ByteArrayInputStream(data, 
> > offset, 
> length);
> >             InputStreamReader isr;
> > @@ -2297,8 +2300,11 @@
> >             BufferedReader br = new BufferedReader(isr);
> >             try {
> >                     SimpleFieldSet fs = new SimpleFieldSet(br, false, true);
> > -                   if(group != null)
> > -                           fs.putAllOverwrite(group.asFieldSet());
> > +                   if(group != null) {
> > +                           SimpleFieldSet sfs = new SimpleFieldSet(true);
> > +                           sfs.put("dsaGroup", group.asFieldSet());
> > +                           fs.putAllOverwrite(sfs);
> > +                   }
> >                     return fs;
> >             } catch(IOException e) {
> >                     FSParseException ex = new FSParseException("Impossible: 
> > " + e);
> 
> Does this mean that nodes prior to the as-yet-unreleased 1155 cannot accept 
> such compressed handshakes?

Yes it does.

> If so, r21633 is rather premature and will break 
> handshaking with older nodes, no?

It's a "receiver-side" patch... At the moment the new code is active
only where it's really needed (in the case of an anonymous-session
establishment: opennet's announcement)... Meaning that until a few
seednodes have updated new clients won't be able to announce.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080806/d38cf5f9/attachment.pgp>

Reply via email to