[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.222 and 1.223

version 1.222, 2016/01/14 16:17:40 version 1.223, 2016/01/29 02:42:46
Line 2231 
Line 2231 
 ssh_packet_need_rekeying(struct ssh *ssh)  ssh_packet_need_rekeying(struct ssh *ssh)
 {  {
         struct session_state *state = ssh->state;          struct session_state *state = ssh->state;
           u_int32_t buf_in, buf_out;
   
         if (ssh->compat & SSH_BUG_NOREKEY)          if (ssh->compat & SSH_BUG_NOREKEY)
                 return 0;                  return 0;
           buf_in = roundup(sshbuf_len(state->input),
               state->newkeys[MODE_IN]->enc.block_size);
           buf_out = roundup(sshbuf_len(state->output),
               state->newkeys[MODE_OUT]->enc.block_size);
         return          return
             (state->p_send.packets > MAX_PACKETS) ||              (state->p_send.packets > MAX_PACKETS) ||
             (state->p_read.packets > MAX_PACKETS) ||              (state->p_read.packets > MAX_PACKETS) ||
             (state->max_blocks_out &&              (state->max_blocks_out &&
                 (state->p_send.blocks > state->max_blocks_out)) ||                  (state->p_send.blocks + buf_out > state->max_blocks_out)) ||
             (state->max_blocks_in &&              (state->max_blocks_in &&
                 (state->p_read.blocks > state->max_blocks_in)) ||                  (state->p_read.blocks + buf_in > state->max_blocks_in)) ||
             (state->rekey_interval != 0 && state->rekey_time +              (state->rekey_interval != 0 && state->rekey_time +
                  state->rekey_interval <= monotime());                   state->rekey_interval <= monotime());
 }  }

Legend:
Removed from v.1.222  
changed lines
  Added in v.1.223