HomeFreeBSD

MFC r360231:

Description

MFC r360231:

libc: Shortcut if_indextoname() if index == 0

If the index we're trying to convert is 0 we can avoid a potentially
expensive call to getifaddrs(). No interface has an ifindex of zero, so
we can handle this as an error: set the errno to ENXIO and return NULL.

Submitted by: Nick Rogers
Sponsored by: RG Nets

Details

Provenance
kpAuthored on
Parents
rS360799: MFC r360231:
Branches
Unknown
Tags
Unknown