]> git.ipfire.org Git - thirdparty/glibc.git/commit
Linux: Drop obsolete kernel support with `if_nameindex' and `if_nametoindex'
authorMaciej W. Rozycki <macro@redhat.com>
Thu, 5 Jun 2025 18:04:46 +0000 (19:04 +0100)
committerMaciej W. Rozycki <macro@redhat.com>
Thu, 5 Jun 2025 18:04:46 +0000 (19:04 +0100)
commit7a751ce39c266143807ef830a949cb8b831783ba
treeb9ee3d1e274c4ebe3c1b5c102b63caf0912a9a7d
parentfcd6a8b5c53a5fbd847aec6fa8d36a71388441c8
Linux: Drop obsolete kernel support with `if_nameindex' and `if_nametoindex'

Support for the SIOCGIFINDEX ioctl(2) Linux ABI (0x8933 command, called
SIOGIFINDEX in the API originally) was added with kernel version 2.1.14
for AF_INET6 sockets, followed by general support with version 2.1.22.
The Linux API was then updated by adding the current SIOCGIFINDEX name
with kernel version 2.1.68, back in Nov 1997.

All these kernel versions are well below our current default required
minimum of 3.2.0, let alone some platform higher version requirements.

Drop support for the absence of the SIOCGIFINDEX ioctl(2) in the API or
ABI, by removing arrangements for the ENOSYS error condition.  Discard
the indirection from '__if_nameindex' to 'if_nameindex_netlink' and
adjust the implementation of '__if_nametoindex' accordingly for a better
code flow.
sysdeps/unix/sysv/linux/if_index.c