]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Updated the ftp response handler to return without doing anything.
authorAnoop Saldanha <anoopsaldanha@gmail.com>
Mon, 21 Oct 2013 10:05:53 +0000 (15:35 +0530)
committerVictor Julien <victor@inliniac.net>
Wed, 4 Dec 2013 08:48:55 +0000 (09:48 +0100)
Currently the processing happening inside the handler is not being used
anywhere else in the engine.

src/app-layer-ftp.c
src/app-layer-ftp.h

index 099a8095a60f4065cc481cb5e40636a00ea43854..bf1ccaf8fe280fa8c8ec8939ce1b92de92b73966 100644 (file)
@@ -199,31 +199,6 @@ static int FTPParseResponse(Flow *f, void *ftp_state, AppLayerParserState *pstat
                             uint8_t *input, uint32_t input_len,
                             void *local_data, AppLayerParserResult *output)
 {
-    SCEnter();
-    //PrintRawDataFp(stdout, input,input_len);
-
-    uint32_t offset = 0;
-    FtpState *fstate = (FtpState *)ftp_state;
-
-    if (pstate == NULL)
-        return -1;
-
-
-    const uint8_t delim[] = { 0x0D, 0x0A };
-    int r = AlpParseFieldByDelimiter(output, pstate, FTP_FIELD_RESPONSE_LINE,
-                                     delim, sizeof(delim), input, input_len,
-                                     &offset);
-    if (r == 0) {
-        pstate->parse_field = 0;
-        return 0;
-    }
-    char rcode[5];
-    memcpy(rcode, input, 4);
-    rcode[4] = '\0';
-    fstate->response_code = atoi(rcode);
-    SCLogDebug("Response: %u\n", fstate->response_code);
-
-    pstate->parse_field = 0;
     return 1;
 }
 
index 89e1d879eb92e3496611c7c88ec4ff4501639524..c102addc9005fae55ab48f5f888aa6e6219371a6 100644 (file)
@@ -95,7 +95,6 @@ enum {
 typedef struct FtpState_ {
     FtpRequestCommand command;
     FtpRequestCommandArgOfs arg_offset;
-    FtpResponseCode response_code;
     uint32_t port_line_len;
     uint8_t *port_line;
 } FtpState;