]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
disallow file_data with flow:to_server/from_client
authorEileen Donlon <emdonlo@gmail.com>
Mon, 30 Apr 2012 15:52:20 +0000 (11:52 -0400)
committerVictor Julien <victor@inliniac.net>
Tue, 1 May 2012 14:11:18 +0000 (16:11 +0200)
src/detect-file-data.c

index f4e2842a7a2b3f8dd6c02c1dd5b1e4129e5c8692..d302c8bfcf287009c16e6fcfb6b7824893234fe5 100644 (file)
@@ -72,7 +72,10 @@ void DetectFiledataRegister(void) {
 static int DetectFiledataSetup (DetectEngineCtx *de_ctx, Signature *s, char *str)
 {
     SCEnter();
-
+    if (s->init_flags & SIG_FLAG_INIT_FLOW && s->flags & SIG_FLAG_TOSERVER && !(s->flags & SIG_FLAG_TOCLIENT)) {
+        SCLogError(SC_ERR_INVALID_SIGNATURE, "Can't use file_data with flow:to_server or from_client with http.");
+        return -1;
+    }
     s->init_flags |= SIG_FLAG_INIT_FILE_DATA;
 
     return 0;