diff --git a/configure.ac b/configure.ac index dba302b745..967ce24967 100644 --- a/configure.ac +++ b/configure.ac @@ -1968,7 +1968,9 @@ 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])) - + 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="# " have_rust_vendor="no" @@ -2006,23 +2008,37 @@ CFLAGS="${CFLAGS} -I\${srcdir}/../rust/gen/c-headers" AC_SUBST(RUST_SURICATA_LIB) AC_SUBST(RUST_LDADD) - AC_SUBST([CARGO], [$HAVE_CARGO]) - if test "x$CARGO_HOME" = "x"; then - AC_SUBST([CARGO_HOME], [~/.cargo]) - else - AC_SUBST([CARGO_HOME], [$CARGO_HOME]) - fi + AC_SUBST([CARGO], [$HAVE_CARGO]) + if test "x$CARGO_HOME" = "x"; then + AC_SUBST([CARGO_HOME], [~/.cargo]) + else + AC_SUBST([CARGO_HOME], [$CARGO_HOME]) + fi AC_CHECK_FILES([$srcdir/rust/vendor], [have_rust_vendor="yes"]) if test "x$have_rust_vendor" = "xyes"; then - rust_vendor_comment="" + rust_vendor_comment="" fi + + rust_config_enabled="yes" + rust_config_comment="" 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_EXTERNAL], [test "x$enable_rust_experimental" = "xyes"]) 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"]) if test "x$enable_rust" = "xyes"; then diff --git a/suricata.yaml.in b/suricata.yaml.in index 28b239b13f..9c7b5ba917 100644 --- a/suricata.yaml.in +++ b/suricata.yaml.in @@ -234,7 +234,7 @@ outputs: #md5: [body, subject] #- dnp3 - #- nfs + @rust_config_comment@- nfs - ssh - stats: totals: yes # stats for all threads merged together @@ -681,10 +681,6 @@ pcap-file: # "detection-only" enables protocol detection only (parser disabled). app-layer: protocols: - ntp: - enabled: yes - nfs: - enabled: yes tls: enabled: yes detection-ports: @@ -740,6 +736,10 @@ app-layer: # smb2 detection is disabled internally inside the engine. #smb2: # enabled: yes + # Note: NFS parser depends on Rust support: pass --enable-rust + # to configure. + nfs: + enabled: @rust_config_enabled@ dns: # memcaps. Globally and per flow/state. #global-memcap: 16mb @@ -896,6 +896,11 @@ app-layer: dp: 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) asn1-max-frames: 256