From 6487c689fd7bded890e183eb8f69390b63d1fdfe Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sun, 7 May 2023 08:17:31 +0200 Subject: [PATCH] windivert: compile fixes --- src/source-windivert.c | 2 ++ src/suricata.c | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/source-windivert.c b/src/source-windivert.c index e35d8f1d74..a896c5757a 100644 --- a/src/source-windivert.c +++ b/src/source-windivert.c @@ -88,6 +88,8 @@ TmEcode NoWinDivertSupportExit(ThreadVars *tv, const void *initdata, } #else /* implied we do have WinDivert support */ +#include "action-globals.h" +#include "win32-syscall.h" typedef struct WinDivertThreadVars_ { WinDivertHandle filter_handle; diff --git a/src/suricata.c b/src/suricata.c index e65426d47b..27126e3084 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -143,6 +143,11 @@ #include "util-time.h" #include "util-validate.h" +#ifdef WINDIVERT +#include "decode-sll.h" +#include "win32-syscall.h" +#endif + /* * we put this here, because we only use it here in main. */ @@ -2449,9 +2454,9 @@ static int ConfigGetCaptureValue(SCInstance *suri) int strip_trailing_plus = 0; switch (suri->run_mode) { #ifdef WINDIVERT - case RUNMODE_WINDIVERT: + case RUNMODE_WINDIVERT: { /* by default, WinDivert collects from all devices */ - mtu = GetGlobalMTUWin32(); + const int mtu = GetGlobalMTUWin32(); if (mtu > 0) { /* SLL_HEADER_LEN is the longest header + 8 for VLAN */ @@ -2460,6 +2465,7 @@ static int ConfigGetCaptureValue(SCInstance *suri) } default_packet_size = DEFAULT_PACKET_SIZE; break; + } #endif /* WINDIVERT */ case RUNMODE_NETMAP: /* in netmap igb0+ has a special meaning, however the -- 2.47.2