|
|
|
@ -74,14 +74,12 @@ static int DetectDnsOpcodeMatch(DetectEngineThreadCtx *det_ctx,
|
|
|
|
return rs_dns_opcode_match(txv, (void *)ctx, flags);
|
|
|
|
return rs_dns_opcode_match(txv, (void *)ctx, flags);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int DetectEngineInspectRequestGenericDnsOpcode(ThreadVars *tv,
|
|
|
|
static int DetectEngineInspectRequestGenericDnsOpcode(DetectEngineCtx *de_ctx,
|
|
|
|
DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
|
|
|
|
DetectEngineThreadCtx *det_ctx, const struct DetectEngineAppInspectionEngine_ *engine,
|
|
|
|
const Signature *s, const SigMatchData *smd,
|
|
|
|
const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id)
|
|
|
|
Flow *f, uint8_t flags, void *alstate,
|
|
|
|
|
|
|
|
void *txv, uint64_t tx_id)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return DetectEngineInspectGenericList(tv, de_ctx, det_ctx, s, smd,
|
|
|
|
return DetectEngineInspectGenericList(
|
|
|
|
f, flags, alstate, txv, tx_id);
|
|
|
|
NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void DetectDnsOpcodeRegister(void)
|
|
|
|
void DetectDnsOpcodeRegister(void)
|
|
|
|
@ -94,13 +92,11 @@ void DetectDnsOpcodeRegister(void)
|
|
|
|
sigmatch_table[DETECT_AL_DNS_OPCODE].AppLayerTxMatch =
|
|
|
|
sigmatch_table[DETECT_AL_DNS_OPCODE].AppLayerTxMatch =
|
|
|
|
DetectDnsOpcodeMatch;
|
|
|
|
DetectDnsOpcodeMatch;
|
|
|
|
|
|
|
|
|
|
|
|
DetectAppLayerInspectEngineRegister("dns.opcode",
|
|
|
|
DetectAppLayerInspectEngineRegister2("dns.opcode", ALPROTO_DNS, SIG_FLAG_TOSERVER, 0,
|
|
|
|
ALPROTO_DNS, SIG_FLAG_TOSERVER, 0,
|
|
|
|
DetectEngineInspectRequestGenericDnsOpcode, NULL);
|
|
|
|
DetectEngineInspectRequestGenericDnsOpcode);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DetectAppLayerInspectEngineRegister("dns.opcode",
|
|
|
|
DetectAppLayerInspectEngineRegister2("dns.opcode", ALPROTO_DNS, SIG_FLAG_TOCLIENT, 0,
|
|
|
|
ALPROTO_DNS, SIG_FLAG_TOCLIENT, 0,
|
|
|
|
DetectEngineInspectRequestGenericDnsOpcode, NULL);
|
|
|
|
DetectEngineInspectRequestGenericDnsOpcode);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dns_opcode_list_id = DetectBufferTypeGetByName("dns.opcode");
|
|
|
|
dns_opcode_list_id = DetectBufferTypeGetByName("dns.opcode");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|