Bug #151 » 0001-fixed-the-payload_len-for-icmpv6-bug-151.patch
src/decode-icmpv6.c | ||
---|---|---|
p->proto = IPPROTO_ICMPV6;
|
||
p->type = p->icmpv6h->type;
|
||
p->code = p->icmpv6h->code;
|
||
p->payload_len = len - ICMPV6_HEADER_LEN;
|
||
SCLogDebug("ICMPV6 TYPE %" PRIu32 " CODE %" PRIu32 "", p->icmpv6h->type,
|
||
p->icmpv6h->code);
|
src/detect-dsize.c | ||
---|---|---|
*/
|
||
int DetectDsizeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p, Signature *s, SigMatch *m)
|
||
{
|
||
SCEnter();
|
||
int ret = 0;
|
||
DetectDsizeData *dd = (DetectDsizeData *)m->ctx;
|
||
SCLogDebug("p->payload_len %"PRIu16"", p->payload_len);
|
||
if (dd->mode == DETECTDSIZE_EQ && dd->dsize == p->payload_len)
|
||
ret = 1;
|
||
else if (dd->mode == DETECTDSIZE_LT && p->payload_len < dd->dsize)
|
||
... | ... | |
else if (dd->mode == DETECTDSIZE_RA && p->payload_len > dd->dsize && p->payload_len < dd->dsize2)
|
||
ret = 1;
|
||
return ret;
|
||
SCReturnInt(ret);
|
||
}
|
||
/**
|
||
... | ... | |
SigMatchAppendPacket(s, sm);
|
||
SCLogDebug("dd->dsize %"PRIu16", dd->dsize2 %"PRIu16", dd->mode %"PRIu8"",
|
||
dd->dsize, dd->dsize2, dd->mode);
|
||
/* tell the sig it has a dsize to speed up engine init */
|
||
s->flags |= SIG_FLAG_DSIZE;
|
||
return 0;
|
- « Previous
- 1
- 2
- Next »