Check for common ALPNs and set a flow risk if not known. (#1175)
* Increased risk bitmask to 64bit (instead of 32bit). * Removed annoying "Unknown datalink" error message for fuzzers. Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
CC=@CC@
|
||||
CXX=@CXX@
|
||||
BUILD_MINGW=@BUILD_MINGW@
|
||||
BUILD_FUZZTARGETS=@BUILD_FUZZTARGETS@
|
||||
SRCHOME=../src
|
||||
CFLAGS=-g -fPIC -DPIC -I$(SRCHOME)/include @PCAP_INC@ @CFLAGS@
|
||||
LIBNDPI=$(SRCHOME)/lib/libndpi.a
|
||||
@@ -10,6 +11,10 @@ HEADERS=intrusion_detection.h reader_util.h $(SRCHOME)/include/ndpi_api.h \
|
||||
OBJS=ndpiReader.o reader_util.o intrusion_detection.o
|
||||
PREFIX?=@prefix@
|
||||
|
||||
ifneq ($(BUILD_FUZZTARGETS),)
|
||||
CFLAGS += -DBUILD_FUZZTARGETS=1
|
||||
endif
|
||||
|
||||
ifneq ($(BUILD_MINGW),)
|
||||
all:
|
||||
@echo 'Examples disabled due to mingw build.'
|
||||
|
||||
@@ -1773,9 +1773,15 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
|
||||
break;
|
||||
|
||||
default:
|
||||
/* We shoudn't be here, because we already checked that this datalink is supported.
|
||||
Should ndpi_is_datalink_supported() be updated? */
|
||||
#ifndef BUILD_FUZZTARGETS
|
||||
/*
|
||||
* We shoudn't be here, because we already checked that this datalink is supported.
|
||||
* Should ndpi_is_datalink_supported() be updated?
|
||||
*
|
||||
* NOTE (toni): We get here quite often during fuzzing and it spams consoles and logfiles. ;)
|
||||
*/
|
||||
printf("Unknown datalink %d\n", datalink_type);
|
||||
#endif
|
||||
return(nproto);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user