[Vortex] BUG: Split greetings message aborts connection

Francis Brosnan Blazquez francis at aspl.es
Thu Apr 24 13:49:41 CEST 2008


Hi Jens,

> So my workaround is going to be to modify my initial changes that  
> break messages into 1k frames, to _not_ do that on channel 0. That
> way  
> the greeting messages will stay in one piece and not trigger the  
> problems with parsing them. However, this really should be fixed at  
> some point because
> (a) if anyone adds enough profiles to grow the greetings beyond 4k,
> it  
> will inevitably break Vortex; and

This is not enough clear for me. To make a greeting reply to go beyond
4k would require the peer accepting that greetings to issue first a SEQ
frame updating the receivers buffer. Otherwise, sending more content
than advised will cause a protocol violation. 

Reading section RFC 3081 3.1.1:

   When a channel is created, the sequence number associated with the
   first payload octet of the first data frame is 0, and the initial
   window size for that channel is 4096 octets.  After channel creation,
   a BEEP peer may update the window size by sending a SEQ frame
   (Section 3.1.3).

..I understand implicitly that a beep peer sending a greeting must
never go beyond 4096. This is because initial window size is 4096, and
to update it you must have a channel created to issue a SEQ frame.

In other words, a peer wanting to send a bigger greeting would require
from the remote peer to first issue a SEQ frame to increase initial
window size for channel 0, before any greetings is sent.

> (b) other BEEP implementations are likely to break frames into small  
> chunks, since it's recommended in the RFC, so Vortex will run into  
> this issue when connecting to those clients.

I don't think so Jens. The RFC talks about MSS (which is usually 16K).
It never talks about MTU. RFC 3081, section 3.1.4:

o  large messages should be segmented into frames no larger than
      two-thirds of TCP's negotiated maximum segment size;

..which would leave us to send messages even longer messages than 4k.

In general, a BEEP peer that do not use 4k as its default size will
behave in an odd fashion (assuming default MSS handle by major OSes).

Cheers!

> —Jens
-- 
Francis Brosnan Blazquez <francis at aspl.es>
Advanced Software Production Line, S.L.




More information about the Vortex mailing list