From b25d1eb58fe36f288563281c050bce44999d6cc9 Mon Sep 17 00:00:00 2001 From: Corey Thomas Date: Mon, 16 Sep 2024 16:12:32 -0400 Subject: [PATCH] dbg: print parser errors --- src/app-layer-parser.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index c8410d41e4a8..2f4702f14318 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -1362,6 +1362,17 @@ int AppLayerParserParse(ThreadVars *tv, AppLayerParserThreadCtx *alp_tctx, Flow alp_tctx->alproto_local_storage[f->protomap][alproto]); if (res.status < 0) { AppLayerIncParserErrorCounter(tv, f); + if (f->alproto == ALPROTO_HTTP) { + printf("omgerr %u.%u.%u.%u:%u -> %u.%u.%u.%u:%u\n", + (uint8_t)f->src.addr_data8[0], + (uint8_t)f->src.addr_data8[1], + (uint8_t)f->src.addr_data8[2], + (uint8_t)f->src.addr_data8[3], f->sp, + (uint8_t)f->dst.addr_data8[0], + (uint8_t)f->dst.addr_data8[1], + (uint8_t)f->dst.addr_data8[2], + (uint8_t)f->dst.addr_data8[3], f->dp); + } goto error; } else if (res.status > 0) { DEBUG_VALIDATE_BUG_ON(res.consumed > input_len);