diff --git a/src/decode-icmpv4.c b/src/decode-icmpv4.c index e29a1ce219..8455860234 100644 --- a/src/decode-icmpv4.c +++ b/src/decode-icmpv4.c @@ -144,6 +144,8 @@ void DecodeICMPV4(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, uint8_t *pkt p->proto = IPPROTO_ICMP; p->type = p->icmpv4h->type; p->code = p->icmpv4h->code; + p->payload = pkt + ICMPV4_HEADER_LEN; + p->payload_len = len - ICMPV4_HEADER_LEN; ICMPV4ExtHdr* icmp4eh = (ICMPV4ExtHdr*) p->icmpv4h; diff --git a/src/decode-icmpv6.c b/src/decode-icmpv6.c index 1ee28aec1f..41725a242b 100644 --- a/src/decode-icmpv6.c +++ b/src/decode-icmpv6.c @@ -167,6 +167,7 @@ void DecodeICMPV6(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, p->type = p->icmpv6h->type; p->code = p->icmpv6h->code; p->payload_len = len - ICMPV6_HEADER_LEN; + p->payload = pkt + ICMPV6_HEADER_LEN; SCLogDebug("ICMPV6 TYPE %" PRIu32 " CODE %" PRIu32 "", p->icmpv6h->type, p->icmpv6h->code); diff --git a/src/util-mpm-b2g.c b/src/util-mpm-b2g.c index 613e31f8a6..9d5b57acbc 100644 --- a/src/util-mpm-b2g.c +++ b/src/util-mpm-b2g.c @@ -63,7 +63,7 @@ void B2gThreadDestroyCtx(MpmCtx *, MpmThreadCtx *); int B2gAddPatternCI(MpmCtx *, uint8_t *, uint16_t, uint16_t, uint16_t, uint32_t, uint32_t, uint8_t); int B2gAddPatternCS(MpmCtx *, uint8_t *, uint16_t, uint16_t, uint16_t, uint32_t, uint32_t, uint8_t); int B2gPreparePatterns(MpmCtx *mpm_ctx); -uint32_t B2gSearchWrap(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx, PatternMatcherQueue *, uint8_t *buf, uint16_t buflen); +inline uint32_t B2gSearchWrap(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx, PatternMatcherQueue *, uint8_t *buf, uint16_t buflen); uint32_t B2gSearch1(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx, PatternMatcherQueue *, uint8_t *buf, uint16_t buflen); #ifdef B2G_SEARCH2 uint32_t B2gSearch2(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx, PatternMatcherQueue *, uint8_t *buf, uint16_t buflen); @@ -852,7 +852,8 @@ uint32_t B2gSearchBNDMq(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx, PatternMa //printf("\n"); //PrintRawDataFp(stdout, buf, buflen); - SCLogDebug("buflen %"PRIu32", ctx->m %"PRIu32", pos %"PRIu32"", buflen, ctx->m, pos); + SCLogDebug("buflen %"PRIu16", ctx->m %"PRIu32", pos %"PRIu32"", buflen, + ctx->m, pos); COUNT(tctx->stat_calls++); COUNT(tctx->stat_m_total+=ctx->m);