[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.236 and 1.237

version 1.236, 2016/09/06 09:22:56 version 1.237, 2016/09/12 01:22:38
Line 37 
Line 37 
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */   */
   
 #include <sys/param.h>  /* MIN roundup */  
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/queue.h>  #include <sys/queue.h>
 #include <sys/socket.h>  #include <sys/socket.h>
Line 1058 
Line 1057 
         else          else
                 *max_blocks = ((u_int64_t)1 << 30) / enc->block_size;                  *max_blocks = ((u_int64_t)1 << 30) / enc->block_size;
         if (state->rekey_limit)          if (state->rekey_limit)
                 *max_blocks = MIN(*max_blocks,                  *max_blocks = MINIMUM(*max_blocks,
                     state->rekey_limit / enc->block_size);                      state->rekey_limit / enc->block_size);
         debug("rekey after %llu blocks", (unsigned long long)*max_blocks);          debug("rekey after %llu blocks", (unsigned long long)*max_blocks);
         return 0;          return 0;
Line 1101 
Line 1100 
                 return 1;                  return 1;
   
         /* Rekey after (cipher-specific) maxiumum blocks */          /* Rekey after (cipher-specific) maxiumum blocks */
         out_blocks = roundup(outbound_packet_len,          out_blocks = ROUNDUP(outbound_packet_len,
             state->newkeys[MODE_OUT]->enc.block_size);              state->newkeys[MODE_OUT]->enc.block_size);
         return (state->max_blocks_out &&          return (state->max_blocks_out &&
             (state->p_send.blocks + out_blocks > state->max_blocks_out)) ||              (state->p_send.blocks + out_blocks > state->max_blocks_out)) ||
Line 1229 
Line 1228 
         if (state->extra_pad) {          if (state->extra_pad) {
                 tmp = state->extra_pad;                  tmp = state->extra_pad;
                 state->extra_pad =                  state->extra_pad =
                     roundup(state->extra_pad, block_size);                      ROUNDUP(state->extra_pad, block_size);
                 /* check if roundup overflowed */                  /* check if roundup overflowed */
                 if (state->extra_pad < tmp)                  if (state->extra_pad < tmp)
                         return SSH_ERR_INVALID_ARGUMENT;                          return SSH_ERR_INVALID_ARGUMENT;

Legend:
Removed from v.1.236  
changed lines
  Added in v.1.237