From: Eric Leblond Date: Fri, 5 Jan 2018 22:32:54 +0000 (+0100) Subject: af-packet: code cleaning and comments X-Git-Tag: suricata-4.1.0-beta1~198 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2598078ee6da1169326c3f59e4ac8766896b8297;p=thirdparty%2Fsuricata.git af-packet: code cleaning and comments --- diff --git a/src/runmode-af-packet.c b/src/runmode-af-packet.c index 71337df9c6..9fa8144ae2 100644 --- a/src/runmode-af-packet.c +++ b/src/runmode-af-packet.c @@ -372,7 +372,7 @@ static void *ParseAFPConfig(const char *iface) aconf->ebpf_lb_file = NULL; } else { #ifdef HAVE_PACKET_EBPF - SCLogInfo("af-packet will use '%s' as eBPF load balancing file", + SCLogConfig("af-packet will use '%s' as eBPF load balancing file", ebpf_file); #endif aconf->ebpf_lb_file = ebpf_file; @@ -397,7 +397,7 @@ static void *ParseAFPConfig(const char *iface) aconf->ebpf_filter_file = NULL; } else { #ifdef HAVE_PACKET_EBPF - SCLogInfo("af-packet will use '%s' as eBPF filter file", + SCLogConfig("af-packet will use '%s' as eBPF filter file", ebpf_file); #endif aconf->ebpf_filter_file = ebpf_file; diff --git a/src/source-af-packet.c b/src/source-af-packet.c index f7ce87d3fa..6ad15e5ff1 100644 --- a/src/source-af-packet.c +++ b/src/source-af-packet.c @@ -2259,6 +2259,7 @@ TmEcode AFPSetBPFFilter(AFPThreadVars *ptv) * \param mapfd file descriptor of the protocol bypass table * \param key data to use as key in the table * \param inittime time of creation of the entry (in monotonic clock) + * \return 0 in case of error, 1 if success */ static int AFPInsertHalfFlow(int mapd, void *key, uint64_t inittime) { @@ -2292,6 +2293,9 @@ static int AFPInsertHalfFlow(int mapd, void *key, uint64_t inittime) } #endif +/** + * Bypass function for AF_PACKET capture + */ static int AFPBypassCallback(Packet *p) { #ifdef HAVE_PACKET_EBPF