Skip to content

Commit 0eecdd1

Browse files
committed
LocalIP (FreeBSD): don't use Wifi speed as Ethernet speed
1 parent acdd1fc commit 0eecdd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/detection/localip/localip_linux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ const char* ffDetectLocalIps(const FFLocalIpOptions* options, FFlist* results)
202202
#elif __FreeBSD__ || __APPLE__
203203
struct ifmediareq ifmr = {};
204204
strncpy(ifmr.ifm_name, iface->name.chars, IFNAMSIZ - 1);
205-
if (ioctl(sockfd, SIOCGIFMEDIA, &ifmr) == 0)
205+
if (ioctl(sockfd, SIOCGIFMEDIA, &ifmr) == 0 && (IFM_TYPE(ifmr.ifm_active) & IFM_ETHER))
206206
{
207207
switch (IFM_SUBTYPE(ifmr.ifm_active))
208208
{

0 commit comments

Comments
 (0)