ntp: enable keywords for firewall mode

Ticket: #8394
pull/15221/head
Jason Ish 6 months ago
parent 713e4eb900
commit fd31e50954

@ -22,7 +22,7 @@ use crate::detect::uint::{
}; };
use crate::detect::{ use crate::detect::{
helper_keyword_register_sticky_buffer, SigTableElmtStickyBuffer, SIGMATCH_INFO_ENUM_UINT, helper_keyword_register_sticky_buffer, SigTableElmtStickyBuffer, SIGMATCH_INFO_ENUM_UINT,
SIGMATCH_INFO_UINT8, SIGMATCH_INFO_UINT8, SIGMATCH_SUPPORT_FIREWALL
}; };
use std::ffi::CStr; use std::ffi::CStr;
use std::os::raw::{c_int, c_void}; use std::os::raw::{c_int, c_void};
@ -30,7 +30,7 @@ use suricata_sys::sys::{
DetectEngineCtx, DetectEngineThreadCtx, Flow, SCDetectBufferSetActiveList, DetectEngineCtx, DetectEngineThreadCtx, Flow, SCDetectBufferSetActiveList,
SCDetectHelperBufferProgressMpmRegister, SCDetectHelperBufferProgressRegister, SCDetectHelperBufferProgressMpmRegister, SCDetectHelperBufferProgressRegister,
SCDetectHelperKeywordRegister, SCDetectSignatureSetAppProto, SCSigMatchAppendSMToList, SCDetectHelperKeywordRegister, SCDetectSignatureSetAppProto, SCSigMatchAppendSMToList,
SCSigTableAppLiteElmt, SigMatchCtx, Signature, SCSigTableAppLiteElmt, SigMatchCtx, Signature
}; };
static mut G_NTP_VERSION_KW_ID: u16 = 0; static mut G_NTP_VERSION_KW_ID: u16 = 0;
@ -199,7 +199,7 @@ pub(super) unsafe extern "C" fn detect_ntp_register() {
AppLayerTxMatch: Some(ntp_detect_version_match), AppLayerTxMatch: Some(ntp_detect_version_match),
Setup: Some(ntp_detect_version_setup), Setup: Some(ntp_detect_version_setup),
Free: Some(ntp_detect_u8_free), Free: Some(ntp_detect_u8_free),
flags: SIGMATCH_INFO_UINT8, flags: SIGMATCH_INFO_UINT8 | SIGMATCH_SUPPORT_FIREWALL,
}; };
G_NTP_VERSION_KW_ID = SCDetectHelperKeywordRegister(&kw); G_NTP_VERSION_KW_ID = SCDetectHelperKeywordRegister(&kw);
G_NTP_GENERIC_BUFFER_ID = SCDetectHelperBufferProgressRegister( G_NTP_GENERIC_BUFFER_ID = SCDetectHelperBufferProgressRegister(
@ -216,7 +216,7 @@ pub(super) unsafe extern "C" fn detect_ntp_register() {
AppLayerTxMatch: Some(ntp_detect_mode_match), AppLayerTxMatch: Some(ntp_detect_mode_match),
Setup: Some(ntp_detect_mode_setup), Setup: Some(ntp_detect_mode_setup),
Free: Some(ntp_detect_u8_free), Free: Some(ntp_detect_u8_free),
flags: SIGMATCH_INFO_UINT8 | SIGMATCH_INFO_ENUM_UINT, flags: SIGMATCH_INFO_UINT8 | SIGMATCH_INFO_ENUM_UINT | SIGMATCH_SUPPORT_FIREWALL,
}; };
G_NTP_MODE_KW_ID = SCDetectHelperKeywordRegister(&kw); G_NTP_MODE_KW_ID = SCDetectHelperKeywordRegister(&kw);
@ -227,7 +227,7 @@ pub(super) unsafe extern "C" fn detect_ntp_register() {
AppLayerTxMatch: Some(ntp_detect_stratum_match), AppLayerTxMatch: Some(ntp_detect_stratum_match),
Setup: Some(ntp_detect_stratum_setup), Setup: Some(ntp_detect_stratum_setup),
Free: Some(ntp_detect_u8_free), Free: Some(ntp_detect_u8_free),
flags: SIGMATCH_INFO_UINT8, flags: SIGMATCH_INFO_UINT8 | SIGMATCH_SUPPORT_FIREWALL,
}; };
G_NTP_STRATUM_KW_ID = SCDetectHelperKeywordRegister(&kw); G_NTP_STRATUM_KW_ID = SCDetectHelperKeywordRegister(&kw);

Loading…
Cancel
Save