Skip to content

Commit

Permalink
dbg: HTTP proto errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Corey Thomas committed Oct 7, 2024
1 parent 3e4f11a commit b5c0a65
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/app-layer-parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1362,6 +1362,18 @@ 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) {
if (f->alproto == ALPROTO_HTTP1 || f->alproto == ALPROTO_HTTP2 || 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);
Expand Down

0 comments on commit b5c0a65

Please sign in to comment.