Skip to content

Commit

Permalink
DBG: print out dns flow errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Corey Thomas committed Sep 16, 2024
1 parent d3eb656 commit f9da993
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/app-layer-parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_DNS && f->proto == IPPROTO_TCP) {
printf("omgerr %d.%d.%d.%d:%d -> %d.%d.%d.%d:%d\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);
Expand Down

0 comments on commit f9da993

Please sign in to comment.