[BACK]Return to packet.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/packet.c between version 1.225 and 1.226

version 1.225, 2016/01/29 03:31:03 version 1.226, 2016/01/29 05:46:01
Line 1054 
Line 1054 
         return 0;          return 0;
 }  }
   
   /* Used to mute debug logging for noisy packet types */
   static int
   ssh_packet_log_type(u_char type)
   {
           switch (type) {
           case SSH2_MSG_CHANNEL_DATA:
           case SSH2_MSG_CHANNEL_EXTENDED_DATA:
           case SSH2_MSG_CHANNEL_WINDOW_ADJUST:
                   return 0;
           default:
                   return 1;
           }
   }
   
 /*  /*
  * Finalize packet in SSH2 format (compress, mac, encrypt, enqueue)   * Finalize packet in SSH2 format (compress, mac, encrypt, enqueue)
  */   */
Line 1082 
Line 1096 
         aadlen = (mac && mac->enabled && mac->etm) || authlen ? 4 : 0;          aadlen = (mac && mac->enabled && mac->etm) || authlen ? 4 : 0;
   
         type = (sshbuf_ptr(state->outgoing_packet))[5];          type = (sshbuf_ptr(state->outgoing_packet))[5];
           if (ssh_packet_log_type(type))
                   debug3("send packet: type %u", type);
 #ifdef PACKET_DEBUG  #ifdef PACKET_DEBUG
         fprintf(stderr, "plain:     ");          fprintf(stderr, "plain:     ");
         sshbuf_dump(state->outgoing_packet, stderr);          sshbuf_dump(state->outgoing_packet, stderr);
Line 1734 
Line 1749 
          */           */
         if ((r = sshbuf_get_u8(state->incoming_packet, typep)) != 0)          if ((r = sshbuf_get_u8(state->incoming_packet, typep)) != 0)
                 goto out;                  goto out;
           if (ssh_packet_log_type(*typep))
                   debug3("receive packet: type %u", *typep);
         if (*typep < SSH2_MSG_MIN || *typep >= SSH2_MSG_LOCAL_MIN) {          if (*typep < SSH2_MSG_MIN || *typep >= SSH2_MSG_LOCAL_MIN) {
                 if ((r = sshpkt_disconnect(ssh,                  if ((r = sshpkt_disconnect(ssh,
                     "Invalid ssh2 packet type: %d", *typep)) != 0 ||                      "Invalid ssh2 packet type: %d", *typep)) != 0 ||

Legend:
Removed from v.1.225  
changed lines
  Added in v.1.226