remotes/origin/master-1.0.x
Gurvinder Singh 16 years ago committed by Victor Julien
parent 58c8103a4b
commit ed99e73622

@ -275,7 +275,7 @@ uint16_t AppLayerDetectGetProto(AlpProtoDetectCtx *ctx, AlpProtoDetectThreadCtx
uint16_t proto;
uint32_t cnt = mpm_table[dir->mpm_ctx.mpm_type].Scan(&dir->mpm_ctx, &tdir->mpm_ctx, &tdir->pmq, buf, scanlen);
//printf("AppLayerDetectGetProto: scan cnt %" PRIu32 "\n", cnt);
SCLogDebug("scan cnt %" PRIu32 "", cnt);
if (cnt == 0) {
proto = ALPROTO_UNKNOWN;
goto end;

@ -1160,6 +1160,7 @@ int StreamTcpReassembleHandleSegmentHandleData(TcpSession *ssn,
static void StreamTcpSetupMsg(TcpSession *ssn, TcpStream *stream, Packet *p,
StreamMsg *smsg)
{
SCEnter();
if (stream->ra_base_seq == stream->isn) {
smsg->flags = STREAM_START;
} else if (ssn->state > TCP_ESTABLISHED) {
@ -1174,14 +1175,22 @@ static void StreamTcpSetupMsg(TcpSession *ssn, TcpStream *stream, Packet *p,
COPY_PORT(p->flow->sp,smsg->data.src_port);
COPY_PORT(p->flow->dp,smsg->data.dst_port);
smsg->flags |= STREAM_TOSERVER;
} else {
COPY_ADDRESS(&p->flow->dst,&smsg->data.src_ip);
COPY_ADDRESS(&p->flow->src,&smsg->data.dst_ip);
COPY_PORT(p->flow->dp,smsg->data.src_port);
COPY_PORT(p->flow->sp,smsg->data.dst_port);
}
/* As we are opposing the stream to handle the ACK, we need to update the
smsg direction accordingly too */
if (stream == &ssn->client) {
smsg->flags |= STREAM_TOSERVER;
SCLogDebug("stream mesage is to_server");
} else {
smsg->flags |= STREAM_TOCLIENT;
SCLogDebug("stream mesage is to_client");
}
smsg->data.data_len = 0;
@ -1189,6 +1198,7 @@ static void StreamTcpSetupMsg(TcpSession *ssn, TcpStream *stream, Packet *p,
if (smsg->flow != NULL) {
smsg->flow->use_cnt++;
}
SCReturn;
}
/** \brief Check the minimum size limits for reassembly.

Loading…
Cancel
Save