diff options
Diffstat (limited to 'src/lib/protocols/ftp_control.c')
-rw-r--r-- | src/lib/protocols/ftp_control.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/protocols/ftp_control.c b/src/lib/protocols/ftp_control.c index ce7903397..7118ff295 100644 --- a/src/lib/protocols/ftp_control.c +++ b/src/lib/protocols/ftp_control.c @@ -42,8 +42,7 @@ static void ndpi_int_ftp_control_add_connection(struct ndpi_detection_module_str /* *************************************************************** */ -static int ndpi_ftp_control_check_request(struct ndpi_detection_module_struct *ndpi_struct, - struct ndpi_flow_struct *flow, +static int ndpi_ftp_control_check_request(struct ndpi_flow_struct *flow, const u_int8_t *payload, size_t payload_len) { #ifdef FTP_DEBUG @@ -59,7 +58,7 @@ static int ndpi_ftp_control_check_request(struct ndpi_detection_module_struct *n snprintf(buf, sizeof(buf), "Found FTP username (%s)", flow->l4.tcp.ftp_imap_pop_smtp.username); - ndpi_set_risk(ndpi_struct, flow, NDPI_CLEAR_TEXT_CREDENTIALS, buf); + ndpi_set_risk(flow, NDPI_CLEAR_TEXT_CREDENTIALS, buf); return 1; } @@ -555,8 +554,7 @@ static int ndpi_ftp_control_check_request(struct ndpi_detection_module_struct *n /* *************************************************************** */ static int ndpi_ftp_control_check_response(struct ndpi_flow_struct *flow, - const u_int8_t *payload, - size_t payload_len) { + const u_int8_t *payload) { #ifdef FTP_DEBUG printf("%s() [%.*s]\n", __FUNCTION__, (int)payload_len, payload); #endif @@ -604,8 +602,8 @@ static void ndpi_check_ftp_control(struct ndpi_detection_module_struct *ndpi_str if(flow->ftp_control_stage == 0) { NDPI_LOG_DBG2(ndpi_struct, "FTP_CONTROL stage 0: \n"); - if((payload_len > 0) && ndpi_ftp_control_check_request(ndpi_struct, - flow, packet->payload, payload_len)) { + if((payload_len > 0) && ndpi_ftp_control_check_request(flow, + packet->payload, payload_len)) { NDPI_LOG_DBG2(ndpi_struct, "Possible FTP_CONTROL request detected, we will look further for the response..\n"); @@ -627,7 +625,7 @@ static void ndpi_check_ftp_control(struct ndpi_detection_module_struct *ndpi_str } /* This is a packet in another direction. Check if we find the proper response. */ - if((payload_len > 0) && ndpi_ftp_control_check_response(flow, packet->payload, payload_len)) { + if((payload_len > 0) && ndpi_ftp_control_check_response(flow, packet->payload)) { NDPI_LOG_INFO(ndpi_struct, "found FTP_CONTROL\n"); #ifdef FTP_DEBUG |