From 0eecdd16ead710ce362bf2a8d1c75d0d91de713b Mon Sep 17 00:00:00 2001 From: Carter Li Date: Sun, 15 Sep 2024 13:17:53 +0800 Subject: [PATCH] LocalIP (FreeBSD): don't use Wifi speed as Ethernet speed --- src/detection/localip/localip_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detection/localip/localip_linux.c b/src/detection/localip/localip_linux.c index 9dfea2537..9dd8aaeac 100644 --- a/src/detection/localip/localip_linux.c +++ b/src/detection/localip/localip_linux.c @@ -202,7 +202,7 @@ const char* ffDetectLocalIps(const FFLocalIpOptions* options, FFlist* results) #elif __FreeBSD__ || __APPLE__ struct ifmediareq ifmr = {}; strncpy(ifmr.ifm_name, iface->name.chars, IFNAMSIZ - 1); - if (ioctl(sockfd, SIOCGIFMEDIA, &ifmr) == 0) + if (ioctl(sockfd, SIOCGIFMEDIA, &ifmr) == 0 && (IFM_TYPE(ifmr.ifm_active) & IFM_ETHER)) { switch (IFM_SUBTYPE(ifmr.ifm_active)) {