diff --git a/src/detect-filestore.c b/src/detect-filestore.c index 70aa84679b..4f05933273 100644 --- a/src/detect-filestore.c +++ b/src/detect-filestore.c @@ -154,10 +154,10 @@ static int FilestorePostMatchWithOptions(Packet *p, Flow *f, const DetectFilesto } else if (this_tx) { /* set in AppLayerTxData. Parsers and logger will propegate it to the * individual files, both new and current. */ - void *txv = AppLayerParserGetTx(p->proto, f->alproto, f->alstate, tx_id); + void *txv = AppLayerParserGetTx(f->proto, f->alproto, f->alstate, tx_id); DEBUG_VALIDATE_BUG_ON(txv == NULL); if (txv != NULL) { - AppLayerTxData *txd = AppLayerParserGetTxData(p->proto, f->alproto, txv); + AppLayerTxData *txd = AppLayerParserGetTxData(f->proto, f->alproto, txv); DEBUG_VALIDATE_BUG_ON(txd == NULL); if (txd != NULL) { txd->file_flags |= FLOWFILE_STORE; @@ -167,7 +167,7 @@ static int FilestorePostMatchWithOptions(Packet *p, Flow *f, const DetectFilesto /* set in flow and AppLayerStateData */ f->file_flags |= FLOWFILE_STORE; - AppLayerStateData *sd = AppLayerParserGetStateData(p->proto, f->alproto, f->alstate); + AppLayerStateData *sd = AppLayerParserGetStateData(f->proto, f->alproto, f->alstate); if (sd != NULL) { sd->file_flags |= FLOWFILE_STORE; } @@ -206,7 +206,7 @@ static int DetectFilestorePostMatch(DetectEngineThreadCtx *det_ctx, #endif } - if (p->proto == IPPROTO_TCP && p->flow->protoctx != NULL) { + if (p->flow->proto == IPPROTO_TCP && p->flow->protoctx != NULL) { /* set filestore depth for stream reassembling */ TcpSession *ssn = (TcpSession *)p->flow->protoctx; TcpSessionSetReassemblyDepth(ssn, FileReassemblyDepth()); diff --git a/src/output-lua.c b/src/output-lua.c index c6b09e53a0..67a0dcb951 100644 --- a/src/output-lua.c +++ b/src/output-lua.c @@ -193,7 +193,8 @@ static int LuaPacketLoggerAlerts(ThreadVars *tv, void *thread_data, const Packet void *txptr = NULL; if (p->flow && p->flow->alstate && (pa->flags & PACKET_ALERT_FLAG_TX)) - txptr = AppLayerParserGetTx(p->proto, p->flow->alproto, p->flow->alstate, pa->tx_id); + txptr = AppLayerParserGetTx( + p->flow->proto, p->flow->alproto, p->flow->alstate, pa->tx_id); LuaStateSetThreadVars(td->lua_ctx->luastate, tv); LuaStateSetPacket(td->lua_ctx->luastate, (Packet *)p); diff --git a/src/output-tx.c b/src/output-tx.c index 708c449a7c..e51afc6d35 100644 --- a/src/output-tx.c +++ b/src/output-tx.c @@ -356,7 +356,7 @@ static TmEcode OutputTxLog(ThreadVars *tv, Packet *p, void *thread_data) /* No child loggers registered. */ return TM_ECODE_OK; } - if (AppLayerParserProtocolHasLogger(p->proto, alproto) == 0) + if (AppLayerParserProtocolHasLogger(ipproto, alproto) == 0) goto end; } void *alstate = f->alstate; @@ -364,7 +364,7 @@ static TmEcode OutputTxLog(ThreadVars *tv, Packet *p, void *thread_data) SCLogDebug("no alstate"); goto end; } - const LoggerId logger_expectation = AppLayerParserProtocolGetLoggerBits(p->proto, alproto); + const LoggerId logger_expectation = AppLayerParserProtocolGetLoggerBits(ipproto, alproto); if (logger_expectation == 0) { SCLogDebug("bail: logger_expectation %u. LOGGER_FILE %u LOGGER_FILEDATA %u", logger_expectation, LOGGER_FILE, LOGGER_FILEDATA); @@ -389,7 +389,7 @@ static TmEcode OutputTxLog(ThreadVars *tv, Packet *p, void *thread_data) uint64_t max_id = tx_id; int logged = 0; int gap = 0; - const bool support_files = AppLayerParserSupportsFiles(p->proto, alproto); + const bool support_files = AppLayerParserSupportsFiles(ipproto, alproto); const uint8_t pkt_dir = STREAM_FLAGS_FOR_PACKET(p); SCLogDebug("pcap_cnt %" PRIu64 ": tx_id %" PRIu64 " total_txs %" PRIu64, p->pcap_cnt, tx_id, @@ -412,9 +412,9 @@ static TmEcode OutputTxLog(ThreadVars *tv, Packet *p, void *thread_data) SCLogDebug("STARTING tx_id %" PRIu64 ", tx %p", tx_id, tx); const int tx_progress_ts = - AppLayerParserGetStateProgress(p->proto, alproto, tx, ts_disrupt_flags); + AppLayerParserGetStateProgress(ipproto, alproto, tx, ts_disrupt_flags); const int tx_progress_tc = - AppLayerParserGetStateProgress(p->proto, alproto, tx, tc_disrupt_flags); + AppLayerParserGetStateProgress(ipproto, alproto, tx, tc_disrupt_flags); const bool tx_complete = (tx_progress_ts == complete_ts && tx_progress_tc == complete_tc); SCLogDebug("file_thread_data %p filedata_thread_data %p", op_thread_data->file,