From be5e082c75b546c64ca61619f863961fb0f76ec5 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Mon, 22 Jun 2020 06:13:08 +0200 Subject: xcompile ready Signed-off-by: Toni Uhlig --- Makefile | 4 ++-- main.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e001398c2..96d00ff65 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ CC = gcc -CFLAGS = -Wall -Wextra $(EXTRA_CFLAGS) -LIBS = -pthread -lpcap -lm +CFLAGS += -Wall -Wextra $(EXTRA_CFLAGS) +LIBS += -pthread -lpcap -lm ifneq ($(CUSTOM_LIBNDPI),) LIBS += '$(CUSTOM_LIBNDPI)' diff --git a/main.c b/main.c index 09770c117..84f14b924 100644 --- a/main.c +++ b/main.c @@ -12,7 +12,7 @@ #include #if !(NDPI_MAJOR >= 3 && NDPI_MINOR >= 2) -#error "nDPI 3.2.0 requiired" +#error "nDPI >= 3.2.0 requiired" #endif #define MAX_FLOW_ROOTS_PER_THREAD 2048 @@ -823,6 +823,7 @@ static void ndpi_process_packet(uint8_t * const args, flow_to_process->ndpi_flow->protos.stun_ssl.ssl.alpn : "-")); flow_to_process->tls_client_hello_seen = 1; } +#if (NDPI_MAJOR >= 3 && NDPI_MINOR > 2) if (flow_to_process->tls_server_hello_seen == 0 && flow_to_process->ndpi_flow->l4.tcp.tls.certificate_processed != 0) { uint8_t unknown_tls_version = 0; fprintf(stderr, "[%8llu, %d, %4d][TLS-SERVER-HELLO] version: %s | common-name(s): %.*s | issuer: %s | subject: %s\n", @@ -839,6 +840,7 @@ static void ndpi_process_packet(uint8_t * const args, flow_to_process->ndpi_flow->protos.stun_ssl.ssl.subjectDN : "-")); flow_to_process->tls_server_hello_seen = 1; } +#endif } } } -- cgit v1.2.3