comparison process-packet.c @ 593:ea103e4476ce

merge of '8849ec659cb45b924158cc3322390a1d3d48daef' and 'a46ca9204de0df58d8701df0d79b6b8ec601b9ce'
author Matt Johnston <matt@ucc.asn.au>
date Wed, 23 Feb 2011 15:10:31 +0000
parents afb089e70892
children a98a2138364a
comparison
equal deleted inserted replaced
591:345aaed42ef4 593:ea103e4476ce
50 type = buf_getbyte(ses.payload); 50 type = buf_getbyte(ses.payload);
51 TRACE(("process_packet: packet type = %d", type)) 51 TRACE(("process_packet: packet type = %d", type))
52 52
53 ses.lastpacket = type; 53 ses.lastpacket = type;
54 54
55 ses.last_packet_time = time(NULL);
56
55 /* These packets we can receive at any time */ 57 /* These packets we can receive at any time */
56 switch(type) { 58 switch(type) {
57 59
58 case SSH_MSG_IGNORE: 60 case SSH_MSG_IGNORE:
59 goto out; 61 goto out;
67 69
68 case SSH_MSG_DISCONNECT: 70 case SSH_MSG_DISCONNECT:
69 /* TODO cleanup? */ 71 /* TODO cleanup? */
70 dropbear_close("Disconnect received"); 72 dropbear_close("Disconnect received");
71 } 73 }
72
73 ses.last_packet_time = time(NULL);
74 74
75 /* This applies for KEX, where the spec says the next packet MUST be 75 /* This applies for KEX, where the spec says the next packet MUST be
76 * NEWKEYS */ 76 * NEWKEYS */
77 if (ses.requirenext != 0) { 77 if (ses.requirenext != 0) {
78 if (ses.requirenext != type) { 78 if (ses.requirenext != type) {