If udpv4 csum isn't calculated, udpv4-csum detection shouldn't run on the
csum.
pull/310/head
Anoop Saldanha 12 years ago committed by Victor Julien
parent ce7d78dd69
commit 0febe5a410

@ -514,7 +514,7 @@ int DetectUDPV4CsumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
{ {
DetectCsumData *cd = (DetectCsumData *)m->ctx; DetectCsumData *cd = (DetectCsumData *)m->ctx;
if (p->ip4h == NULL || p->udph == NULL || p->proto != IPPROTO_UDP || PKT_IS_PSEUDOPKT(p)) if (p->ip4h == NULL || p->udph == NULL || p->proto != IPPROTO_UDP || PKT_IS_PSEUDOPKT(p) || p->udph->uh_sum == 0)
return 0; return 0;
if (p->flags & PKT_IGNORE_CHECKSUM) { if (p->flags & PKT_IGNORE_CHECKSUM) {

Loading…
Cancel
Save