rust: enable/disable yaml settings

Based on compile time settings, enable/disable app-layers
and loggers.
pull/2814/head
Victor Julien 9 years ago
parent 87dbda1d1e
commit 9dab3ec71e

@ -1968,7 +1968,9 @@
AC_ARG_ENABLE([rust], AS_HELP_STRING([--enable-rust], [Enable Experimental Rust support])) AC_ARG_ENABLE([rust], AS_HELP_STRING([--enable-rust], [Enable Experimental Rust support]))
AC_ARG_ENABLE([rust_experimental], AS_HELP_STRING([--enable-rust-experimental], [Enable support for experimental Rus parsers])) AC_ARG_ENABLE([rust_experimental], AS_HELP_STRING([--enable-rust-experimental], [Enable support for experimental Rus parsers]))
rust_config_enabled="no" # used in suricata.yaml.in to enable/disable app-layers
rust_config_comment="#" # used in suricata.yaml.in to enable/disable eve loggers
rust_config_exp_enabled="no" # used in suricata.yaml.in to enable/disable app-layers
rust_vendor_comment="# " rust_vendor_comment="# "
have_rust_vendor="no" have_rust_vendor="no"
@ -2006,23 +2008,37 @@
CFLAGS="${CFLAGS} -I\${srcdir}/../rust/gen/c-headers" CFLAGS="${CFLAGS} -I\${srcdir}/../rust/gen/c-headers"
AC_SUBST(RUST_SURICATA_LIB) AC_SUBST(RUST_SURICATA_LIB)
AC_SUBST(RUST_LDADD) AC_SUBST(RUST_LDADD)
AC_SUBST([CARGO], [$HAVE_CARGO]) AC_SUBST([CARGO], [$HAVE_CARGO])
if test "x$CARGO_HOME" = "x"; then if test "x$CARGO_HOME" = "x"; then
AC_SUBST([CARGO_HOME], [~/.cargo]) AC_SUBST([CARGO_HOME], [~/.cargo])
else else
AC_SUBST([CARGO_HOME], [$CARGO_HOME]) AC_SUBST([CARGO_HOME], [$CARGO_HOME])
fi fi
AC_CHECK_FILES([$srcdir/rust/vendor], [have_rust_vendor="yes"]) AC_CHECK_FILES([$srcdir/rust/vendor], [have_rust_vendor="yes"])
if test "x$have_rust_vendor" = "xyes"; then if test "x$have_rust_vendor" = "xyes"; then
rust_vendor_comment="" rust_vendor_comment=""
fi fi
rust_config_enabled="yes"
rust_config_comment=""
fi fi
fi fi
fi fi
if test "x$enable_rust_experimental" = "xyes"; then
rust_config_exp_enabled="yes"
rust_config_exp_comment=""
else
enable_rust_experimental="no"
fi
AM_CONDITIONAL([HAVE_RUST], [test "x$enable_rust" = "xyes"]) AM_CONDITIONAL([HAVE_RUST], [test "x$enable_rust" = "xyes"])
AM_CONDITIONAL([HAVE_RUST_EXTERNAL], [test "x$enable_rust_experimental" = "xyes"]) AM_CONDITIONAL([HAVE_RUST_EXTERNAL], [test "x$enable_rust_experimental" = "xyes"])
AC_SUBST(rust_vendor_comment) AC_SUBST(rust_vendor_comment)
AC_SUBST(rust_config_enabled)
AC_SUBST(rust_config_comment)
AC_SUBST(rust_config_exp_comment)
AC_SUBST(rust_config_exp_enabled)
AM_CONDITIONAL([HAVE_RUST_VENDOR], [test "x$have_rust_vendor" = "xyes"]) AM_CONDITIONAL([HAVE_RUST_VENDOR], [test "x$have_rust_vendor" = "xyes"])
if test "x$enable_rust" = "xyes"; then if test "x$enable_rust" = "xyes"; then

@ -234,7 +234,7 @@ outputs:
#md5: [body, subject] #md5: [body, subject]
#- dnp3 #- dnp3
#- nfs @rust_config_comment@- nfs
- ssh - ssh
- stats: - stats:
totals: yes # stats for all threads merged together totals: yes # stats for all threads merged together
@ -681,10 +681,6 @@ pcap-file:
# "detection-only" enables protocol detection only (parser disabled). # "detection-only" enables protocol detection only (parser disabled).
app-layer: app-layer:
protocols: protocols:
ntp:
enabled: yes
nfs:
enabled: yes
tls: tls:
enabled: yes enabled: yes
detection-ports: detection-ports:
@ -740,6 +736,10 @@ app-layer:
# smb2 detection is disabled internally inside the engine. # smb2 detection is disabled internally inside the engine.
#smb2: #smb2:
# enabled: yes # enabled: yes
# Note: NFS parser depends on Rust support: pass --enable-rust
# to configure.
nfs:
enabled: @rust_config_enabled@
dns: dns:
# memcaps. Globally and per flow/state. # memcaps. Globally and per flow/state.
#global-memcap: 16mb #global-memcap: 16mb
@ -896,6 +896,11 @@ app-layer:
dp: 44818 dp: 44818
sp: 44818 sp: 44818
# Note: parser depends on experimental Rust support
# with --enable-rust-experimental passed to configure
ntp:
enabled: @rust_config_exp_enabled@
# Limit for the maximum number of asn1 frames to decode (default 256) # Limit for the maximum number of asn1 frames to decode (default 256)
asn1-max-frames: 256 asn1-max-frames: 256

Loading…
Cancel
Save