diff options
-rw-r--r-- | configure.seed | 2 | ||||
-rw-r--r-- | src/lib/Makefile.in | 2 | ||||
-rw-r--r-- | src/lib/ndpi_main.c | 10 | ||||
-rw-r--r-- | src/lib/ndpi_utils.c | 2 | ||||
-rw-r--r-- | src/lib/protocols/http.c | 1 | ||||
-rw-r--r-- | src/lib/protocols/openvpn.c | 7 | ||||
-rw-r--r-- | src/lib/protocols/ssl.c | 3 | ||||
-rw-r--r-- | src/lib/protocols/stun.c | 2 |
8 files changed, 4 insertions, 25 deletions
diff --git a/configure.seed b/configure.seed index 5d3ed0458..fbc30ae07 100644 --- a/configure.seed +++ b/configure.seed @@ -13,8 +13,6 @@ AC_PROG_CC_STDC AC_LANG_WERROR AX_PTHREAD -CFLAGS+=" -Wall -Werror" - NDPI_VERSION_SHORT="@NDPI_VERSION_SHORT@" NDPI_MAJOR="@NDPI_MAJOR@" NDPI_MINOR="@NDPI_MINOR@" diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in index 45adb5eee..6b72d9fdf 100644 --- a/src/lib/Makefile.in +++ b/src/lib/Makefile.in @@ -14,7 +14,7 @@ prefix = @prefix@ libdir = ${prefix}/lib includedir = ${prefix}/include/ndpi CC = @CC@ -CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION -O2 -g @CFLAGS@ +CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION -O2 -g -Wall -Werror RANLIB = ranlib OBJECTS = $(patsubst protocols/%.c, protocols/%.o, $(wildcard protocols/*.c)) $(patsubst third_party/src/%.c, third_party/src/%.o, $(wildcard third_party/src/*.c)) ndpi_main.o ndpi_utils.o diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 325123476..b679fe283 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -5861,7 +5861,6 @@ int ndpi_match_string_subprotocol(struct ndpi_detection_module_struct *ndpi_stru AC_TEXT_t ac_input_text; ndpi_automa *automa = is_host_match ? &ndpi_struct->host_automa : &ndpi_struct->content_automa; AC_REP_t match = { NDPI_PROTOCOL_UNKNOWN, NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, NDPI_PROTOCOL_UNRATED }; - int rc; if((automa->ac_automa == NULL) || (string_to_match_len == 0)) return(NDPI_PROTOCOL_UNKNOWN); @@ -5872,22 +5871,15 @@ int ndpi_match_string_subprotocol(struct ndpi_detection_module_struct *ndpi_stru } ac_input_text.astring = string_to_match, ac_input_text.length = string_to_match_len; - rc = ac_automata_search(((AC_AUTOMATA_t*)automa->ac_automa), &ac_input_text, &match); + ac_automata_search(((AC_AUTOMATA_t*)automa->ac_automa), &ac_input_text, &match); ac_automata_reset(((AC_AUTOMATA_t*)automa->ac_automa)); /* We need to take into account also rc==0 that is used for partial matches */ -#if 0 - if(rc) { -#endif ret_match->protocol_id = match.number, ret_match->protocol_category = match.category, ret_match->protocol_breed = match.breed; return(match.number); -#if 0 - } else - return(NDPI_PROTOCOL_UNKNOWN); -#endif } #ifdef HAVE_HYPERSCAN diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c index 933d5634c..72c7ba207 100644 --- a/src/lib/ndpi_utils.c +++ b/src/lib/ndpi_utils.c @@ -50,8 +50,6 @@ #define NDPI_CONST_GENERIC_PROTOCOL_NAME "GenericProtocol" -static int _ndpi_debug_callbacks = 0; - // #define MATCH_DEBUG 1 /* implementation of the punycode check function */ diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c index 1f5b88c7a..51ec9ded8 100644 --- a/src/lib/protocols/http.c +++ b/src/lib/protocols/http.c @@ -123,7 +123,6 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_ struct ndpi_flow_struct *flow) { struct ndpi_packet_struct *packet = &flow->packet; - u_int8_t a; if((!ndpi_struct->http_dont_dissect_response) && flow->http_detected && (flow->http.response_status_code != 0)) { ndpi_set_detected_protocol(ndpi_struct, flow, flow->http_upper_protocol, flow->http_lower_protocol); diff --git a/src/lib/protocols/openvpn.c b/src/lib/protocols/openvpn.c index b92eb5cf7..6c08bba5a 100644 --- a/src/lib/protocols/openvpn.c +++ b/src/lib/protocols/openvpn.c @@ -40,13 +40,6 @@ #define P_PACKET_ID_ARRAY_LEN_OFFSET(hmac_size) (P_HARD_RESET_PACKET_ID_OFFSET(hmac_size) + 8) #define P_HARD_RESET_CLIENT_MAX_COUNT 5 -static void ndpi_int_openvpn_add_connection(struct ndpi_detection_module_struct - *ndpi_struct, struct ndpi_flow_struct *flow) { - NDPI_LOG_INFO(ndpi_struct, "found memcached\n"); - ndpi_set_detected_protocol(ndpi_struct, flow, - NDPI_PROTOCOL_MEMCACHED, NDPI_PROTOCOL_UNKNOWN); -} - static #ifndef WIN32 inline diff --git a/src/lib/protocols/ssl.c b/src/lib/protocols/ssl.c index 29b22ac11..18e8ca469 100644 --- a/src/lib/protocols/ssl.c +++ b/src/lib/protocols/ssl.c @@ -633,7 +633,7 @@ int getSSLcertificate(struct ndpi_detection_module_struct *ndpi_struct, /* Move to the first extension Type is u_int to avoid possible overflow on extension_len addition */ u_int extension_offset = 0; - u_int32_t md5h[4], j; + u_int32_t j; while(extension_offset < extensions_len) { u_int16_t extension_id, extension_len, extn_off = offset+extension_offset; @@ -833,7 +833,6 @@ void getSSLorganization(struct ndpi_detection_module_struct *ndpi_struct, for(i = 9; i < packet->payload_packet_len-4; i++) { /* Organization OID: 2.5.4.10 */ if((packet->payload[i] == 0x55) && (packet->payload[i+1] == 0x04) && (packet->payload[i+2] == 0x0a)) { - u_int8_t type_tag = packet->payload[i+3]; // 0x0c: utf8string / 0x13: printable_string u_int8_t server_len = packet->payload[i+4]; num_found++; diff --git a/src/lib/protocols/stun.c b/src/lib/protocols/stun.c index 3e2e037f2..500251a25 100644 --- a/src/lib/protocols/stun.c +++ b/src/lib/protocols/stun.c @@ -53,7 +53,7 @@ static ndpi_int_stun_t ndpi_int_check_stun(struct ndpi_detection_module_struct * u_int8_t *is_whatsapp) { u_int16_t msg_type, msg_len; struct stun_packet_header *h = (struct stun_packet_header*)payload; - u_int8_t can_this_be_whatsapp_voice = 1, wa = 0; + u_int8_t can_this_be_whatsapp_voice = 1; flow->protos.stun_ssl.stun.num_processed_pkts++; |