]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Fixes other affected tests for smtp pipelining
authorPhilippe Antoine <contact@catenacyber.fr>
Wed, 5 Dec 2018 09:22:18 +0000 (10:22 +0100)
committerVictor Julien <victor@inliniac.net>
Sat, 16 Feb 2019 13:58:18 +0000 (14:58 +0100)
Either checking state has pipelining
Or removing pipelining from input

src/app-layer-smtp.c

index 29a91c709bc5292fb0b0d995307e5f3cecba4a2c..e525dadb7df9b7c9d4b3f6224323d683a2fe9eb4 100644 (file)
@@ -1972,8 +1972,6 @@ static int SMTPParserTest02(void)
         0x61, 0x5f, 0x73, 0x6c, 0x61, 0x63, 0x6b, 0x5f,
         0x76, 0x6d, 0x31, 0x2e, 0x6c, 0x6f, 0x63, 0x61,
         0x6c, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x0d,
-        0x0a, 0x32, 0x35, 0x30, 0x2d, 0x50, 0x49, 0x50,
-        0x45, 0x4c, 0x49, 0x4e, 0x49, 0x4e, 0x47, 0x0d,
         0x0a, 0x32, 0x35, 0x30, 0x2d, 0x53, 0x49, 0x5a,
         0x45, 0x20, 0x31, 0x30, 0x32, 0x34, 0x30, 0x30,
         0x30, 0x30, 0x0d, 0x0a, 0x32, 0x35, 0x30, 0x2d,
@@ -3179,7 +3177,8 @@ static int SMTPParserTest05(void)
     if (smtp_state->input_len != 0 ||
         smtp_state->cmds_cnt != 0 ||
         smtp_state->cmds_idx != 0 ||
-        smtp_state->parser_state != SMTP_PARSER_STATE_FIRST_REPLY_SEEN) {
+        smtp_state->parser_state != (SMTP_PARSER_STATE_FIRST_REPLY_SEEN |
+                                     SMTP_PARSER_STATE_PIPELINING_SERVER)) {
         printf("smtp parser in inconsistent state\n");
         goto end;
     }
@@ -3197,7 +3196,8 @@ static int SMTPParserTest05(void)
         smtp_state->cmds_cnt != 1 ||
         smtp_state->cmds_idx != 0 ||
         smtp_state->cmds[0] != SMTP_COMMAND_STARTTLS ||
-        smtp_state->parser_state != SMTP_PARSER_STATE_FIRST_REPLY_SEEN) {
+        smtp_state->parser_state != (SMTP_PARSER_STATE_FIRST_REPLY_SEEN |
+                                     SMTP_PARSER_STATE_PIPELINING_SERVER)) {
         printf("smtp parser in inconsistent state\n");
         goto end;
     }
@@ -3214,7 +3214,8 @@ static int SMTPParserTest05(void)
     if (smtp_state->input_len != 0 ||
         smtp_state->cmds_cnt != 0 ||
         smtp_state->cmds_idx != 0 ||
-        smtp_state->parser_state != (SMTP_PARSER_STATE_FIRST_REPLY_SEEN)) {
+        smtp_state->parser_state != (SMTP_PARSER_STATE_FIRST_REPLY_SEEN |
+                                     SMTP_PARSER_STATE_PIPELINING_SERVER)) {
         printf("smtp parser in inconsistent state\n");
         goto end;
     }
@@ -3239,7 +3240,8 @@ static int SMTPParserTest05(void)
         smtp_state->cmds_cnt != 1 ||
         smtp_state->cmds_idx != 0 ||
         smtp_state->cmds[0] != SMTP_COMMAND_OTHER_CMD ||
-        smtp_state->parser_state != SMTP_PARSER_STATE_FIRST_REPLY_SEEN) {
+        smtp_state->parser_state != (SMTP_PARSER_STATE_FIRST_REPLY_SEEN |
+                                     SMTP_PARSER_STATE_PIPELINING_SERVER)) {
         printf("smtp parser in inconsistent state\n");
         goto end;
     }
@@ -3256,7 +3258,8 @@ static int SMTPParserTest05(void)
     if (smtp_state->input_len != 0 ||
         smtp_state->cmds_cnt != 0 ||
         smtp_state->cmds_idx != 0 ||
-        smtp_state->parser_state != (SMTP_PARSER_STATE_FIRST_REPLY_SEEN)) {
+        smtp_state->parser_state != (SMTP_PARSER_STATE_FIRST_REPLY_SEEN |
+                                     SMTP_PARSER_STATE_PIPELINING_SERVER)) {
         printf("smtp parser in inconsistent state\n");
         goto end;
     }
@@ -3343,8 +3346,6 @@ static int SMTPParserTest06(void)
         0x5d, 0x0d, 0x0a, 0x32, 0x35, 0x30, 0x2d, 0x53,
         0x49, 0x5a, 0x45, 0x20, 0x32, 0x39, 0x36, 0x39,
         0x36, 0x30, 0x30, 0x30, 0x0d, 0x0a, 0x32, 0x35,
-        0x30, 0x2d, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49,
-        0x4e, 0x49, 0x4e, 0x47, 0x0d, 0x0a, 0x32, 0x35,
         0x30, 0x2d, 0x38, 0x62, 0x69, 0x74, 0x6d, 0x69,
         0x6d, 0x65, 0x0d, 0x0a, 0x32, 0x35, 0x30, 0x2d,
         0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x4d, 0x49,
@@ -4494,8 +4495,6 @@ static int SMTPParserTest14(void)
             0x61, 0x5f, 0x73, 0x6c, 0x61, 0x63, 0x6b, 0x5f,
             0x76, 0x6d, 0x31, 0x2e, 0x6c, 0x6f, 0x63, 0x61,
             0x6c, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x0d,
-            0x0a, 0x32, 0x35, 0x30, 0x2d, 0x50, 0x49, 0x50,
-            0x45, 0x4c, 0x49, 0x4e, 0x49, 0x4e, 0x47, 0x0d,
             0x0a, 0x32, 0x35, 0x30, 0x2d, 0x53, 0x49, 0x5a,
             0x45, 0x20, 0x31, 0x30, 0x32, 0x34, 0x30, 0x30,
             0x30, 0x30, 0x0d, 0x0a, 0x32, 0x35, 0x30, 0x2d,