]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Bail out early if we're in http tunnel mode.
authorVictor Julien <victor@inliniac.net>
Tue, 20 Mar 2012 11:55:45 +0000 (12:55 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 20 Mar 2012 11:55:45 +0000 (12:55 +0100)
src/app-layer-htp.c

index a320f4f2db59386d2b76e41d2cc6ccbc2cb6f1e2..694bfa521098b9fcbdf377c1a681811ef15be619 100644 (file)
@@ -640,6 +640,8 @@ static int HTPHandleRequestData(Flow *f, void *htp_state,
         SCLogError(SC_ERR_ALPARSER, "Inbound parser is in error state, no"
                 " need to feed data to libhtp");
         SCReturnInt(-1);
+    } else if (hstate->connp->in_status == STREAM_STATE_TUNNEL) {
+        SCReturnInt(0);
     }
 
     /* Unset the body inspection (the callback should
@@ -731,6 +733,8 @@ static int HTPHandleResponseData(Flow *f, void *htp_state,
         SCLogError(SC_ERR_ALPARSER, "Outbound parser is in error state, no"
                 " need to feed data to libhtp");
         SCReturnInt(-1);
+    } else if (hstate->connp->out_status == STREAM_STATE_TUNNEL) {
+        SCReturnInt(0);
     }
 
     /* Unset the body inspection (the callback should