]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust: remove multi level 'experimental' 3315/head
authorVictor Julien <victor@inliniac.net>
Mon, 26 Mar 2018 09:50:58 +0000 (11:50 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 26 Mar 2018 09:50:58 +0000 (11:50 +0200)
Don't treat 'external' parsers as more experimental. All parsers
depend on crates to some extend, and all have C glue code. So the
distinction doesn't really make sense.

configure.ac
rust/Cargo.toml.in
rust/Makefile.am
rust/src/lib.rs
src/app-layer-ntp.c
suricata.yaml.in

index 1e3a467406e4a5731bfe879d5153925d4c5b22ad..1696623b7345f91d8b6f9c49002e6f630fbdb7f2 100644 (file)
 
 # Cargo/Rust.
     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"
 
       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
         echo "       for building the distribution"
         echo "   To install: cargo install cargo-vendor"
       fi
-
-      if test "x$enable_rust_experimental" = "xyes"; then
-          AC_DEFINE([HAVE_RUST_EXTERNAL],[1],[Enable support for experimental Rust parsers])
-      fi
     fi
     AM_CONDITIONAL([HAVE_CARGO_VENDOR], [test "x$HAVE_CARGO_VENDOR" != "xno"])
 
@@ -2314,7 +2298,6 @@ SURICATA_BUILD_CONF="Suricata Configuration:
   Libnet support:                          ${enable_libnet}
 
   Rust support (experimental):             ${enable_rust}
-  Experimental Rust parsers:               ${enable_rust_experimental}
   Rust strict mode:                        ${enable_rust_strict}
   Rust debug mode:                         ${enable_rust_debug}
 
index 4cb837437e1ad7d8aa4754f83d95a0cca60502a1..263b715dd07e769f04a464655f1ed40537677432 100644 (file)
@@ -10,7 +10,6 @@ debug = true
 
 [features]
 lua = []
-experimental = ["ntp-parser"]
 strict = []
 debug = []
 
@@ -21,5 +20,5 @@ crc = "~1.7.0"
 der-parser = "0.5.2"
 kerberos-parser = "0.1.0"
 
-ntp-parser = { version = "^0", optional = true }
+ntp-parser = "^0"
 ipsec-parser = "~0.3.0"
index 6bc8a7b018c654c2d5441b57ce784af1d54815fc..fc9b6a0a901639b99d7191505e43113a529a074c 100644 (file)
@@ -25,10 +25,6 @@ if HAVE_LUA
 RUST_FEATURES +=       lua
 endif
 
-if HAVE_RUST_EXTERNAL
-RUST_FEATURES +=       experimental
-endif
-
 if DEBUG
 RUST_FEATURES +=       debug
 endif
index ba44491ee327b12ffd19b5213bc47bd17d0e383c..5e4689e9439f25207045490041dec8147fd3f12a 100644 (file)
@@ -52,6 +52,5 @@ pub mod smb;
 
 pub mod ikev2;
 
-#[cfg(feature = "experimental")]
 pub mod ntp;
 pub mod tftp;
index aa5d700345c0b913075a557c8a93108ca3e9987c..85e0aa223f78bbde53967129737c0ac4a3d21fe9 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "app-layer-ntp.h"
 
-#if defined(HAVE_RUST) && defined(HAVE_RUST_EXTERNAL)
+#if defined(HAVE_RUST)
 
 #include "rust-ntp-ntp-gen.h"
 
index 9d4c0e9c3b18c580e6442de355096e6f3b875bda..1fe208e2349f1b0e00241acb77e19d6fd096a216 100644 (file)
@@ -1013,9 +1013,8 @@ app-layer:
         sp: 44818
 
     # Note: parser depends on experimental Rust support
-    # with --enable-rust-experimental passed to configure
     ntp:
-      enabled: @rust_config_exp_enabled@
+      enabled: @rust_config_enabled@
 
 # Limit for the maximum number of asn1 frames to decode (default 256)
 asn1-max-frames: 256