Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jul 2020 20:18:36 +0000
From:      bugzilla-noreply@freebsd.org
To:        emulation@FreeBSD.org
Subject:   [Bug 174933] [linux] if_nameindex fail in linuxulator enviroment (PF_NETLINK needed)
Message-ID:  <bug-174933-4077-YbVOivFtqG@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-174933-4077@https.bugs.freebsd.org/bugzilla/>
References:  <bug-174933-4077@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D174933

--- Comment #7 from Alex S <iwtcex@gmail.com> ---
(In reply to pete from comment #6)

Hmm=E2=80=A6 Judging by the installer/demo disassembly, this syscall comes =
from the
function named GetMACAddressLIN, so intent is clear enough. The code mostly
involves socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) + SIOCGIFFLAGS and
SIOCGIFHWADDR ioctls. However, there is also if_nameindex (obviously), whic=
h is
internally implemented in glibc with a PF_NETLINK socket. X-Plane is probab=
ly
only interested there in the name of the first returned interface. (Disclai=
mer:
I'm not actually good at reading assembly by any measure.)

If you are willing to spend your time on application-specific hacks, you sh=
ould
try writing LD_PRELOADable variants for if_nameindex and if_freenameindex.
Either stub them or get the necessary information from linsysfs at
/sys/class/net.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-174933-4077-YbVOivFtqG>