~ubuntu-branches/ubuntu/vivid/dropbear/vivid

« back to all changes in this revision

Viewing changes to packet.c

  • Committer: Package Import Robot
  • Author(s): Gerrit Pape
  • Date: 2011-11-16 12:36:03 UTC
  • mfrom: (1.4.4)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: package-import@ubuntu.com-20111116123603-qkpk0p5e3gegporw
ImportĀ upstreamĀ versionĀ 2011.54

Show diffs side-by-side

added added

removed removed

Lines of Context:
441
441
 
442
442
        TRACE(("encrypt_packet type is %d", packet_type))
443
443
        
444
 
        if (!ses.dataallowed && !packet_is_okay_kex(packet_type)) {
 
444
        if ((!ses.dataallowed && !packet_is_okay_kex(packet_type))
 
445
                        || ses.kexstate.sentnewkeys) {
445
446
                /* During key exchange only particular packets are allowed.
446
447
                        Since this packet_type isn't OK we just enqueue it to send 
447
448
                        after the KEX, see maybe_flush_reply_queue */
 
449
 
 
450
                /* We also enqueue packets here when we have sent a MSG_NEWKEYS
 
451
                 * packet but are yet to received one. For simplicity we just switch
 
452
                 * over all the keys at once. This is the 'ses.kexstate.sentnewkeys'
 
453
                 * case. */
448
454
                enqueue_reply_packet();
449
455
                return;
450
456
        }