From: Victor Julien Date: Thu, 10 Apr 2014 15:26:00 +0000 (+0200) Subject: stream: fix midstream syn/ack setup X-Git-Tag: suricata-2.0.1rc1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1dcc7a26889a5a17043dcac52725a5fa692de81;p=thirdparty%2Fsuricata.git stream: fix midstream syn/ack setup If midstream is enabled and the first packet is the syn/ack packet from the 3whs, initialized server.last_ack to the packets seq. This fixes tracking the session. --- diff --git a/src/stream-tcp.c b/src/stream-tcp.c index 0f69138310..797ed28c8c 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -833,6 +833,8 @@ static int StreamTcpPacketStateNone(ThreadVars *tv, Packet *p, ssn->client.next_seq = ssn->client.isn + 1; ssn->client.last_ack = TCP_GET_ACK(p); + ssn->server.last_ack = TCP_GET_SEQ(p); + /** If the client has a wscale option the server had it too, * so set the wscale for the server to max. Otherwise none * will have the wscale opt just like it should. */