Skip to content

Commit

Permalink
LocalIP (FreeBSD): don't use Wifi speed as Ethernet speed
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Sep 15, 2024
1 parent acdd1fc commit 0eecdd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/detection/localip/localip_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down

0 comments on commit 0eecdd1

Please sign in to comment.