From 2bb451d9e498ed6921837fa1953bf7491cf826fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sat, 9 Aug 2025 18:44:37 +0800 Subject: [PATCH] LocalIP (Linux): fix compiler warnings --- src/detection/localip/localip.h | 2 +- src/detection/localip/localip_linux.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/detection/localip/localip.h b/src/detection/localip/localip.h index ddcb5e503..78609f690 100644 --- a/src/detection/localip/localip.h +++ b/src/detection/localip/localip.h @@ -21,7 +21,7 @@ typedef struct FFLocalIpNIFlag const char *name; } FFLocalIpNIFlag; -static inline void ffLocalIpFillNIFlags(FFstrbuf *buf, uint32_t flag, const FFLocalIpNIFlag names[]) +static inline void ffLocalIpFillNIFlags(FFstrbuf *buf, uint64_t flag, const FFLocalIpNIFlag names[]) { for (const FFLocalIpNIFlag *nf = names; flag && nf->name; ++nf) { diff --git a/src/detection/localip/localip_linux.c b/src/detection/localip/localip_linux.c index 2626afaaa..59a4227d9 100644 --- a/src/detection/localip/localip_linux.c +++ b/src/detection/localip/localip_linux.c @@ -87,7 +87,7 @@ static const FFLocalIpNIFlag niFlagOptions[] = { {}, }; -static void addNewIp(FFlist* list, const char* name, const char* addr, int type, bool defaultRoute, uint32_t flags, bool firstOnly) +static void addNewIp(FFlist* list, const char* name, const char* addr, int type, bool defaultRoute, uint64_t flags, bool firstOnly) { FFLocalIpResult* ip = NULL; @@ -244,7 +244,7 @@ const char* ffDetectLocalIps(const FFLocalIpOptions* options, FFlist* results) if (options->namePrefix.length && strncmp(ifa->ifa_name, options->namePrefix.chars, options->namePrefix.length) != 0) continue; - uint32_t flags = options->showType & FF_LOCALIP_TYPE_FLAGS_BIT ? ifa->ifa_flags : 0; + uint64_t flags = options->showType & FF_LOCALIP_TYPE_FLAGS_BIT ? ifa->ifa_flags : 0; if (ifa->ifa_addr->sa_family == AF_INET) {