]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
Linux: Add support for ARPHRD_NONE
authorRoy Marples <roy@marples.name>
Tue, 20 Aug 2019 21:59:47 +0000 (22:59 +0100)
committerRoy Marples <roy@marples.name>
Tue, 20 Aug 2019 21:59:47 +0000 (22:59 +0100)
commit208b25190faffe0735c19e69c03e122e5c54dfbf
tree8d1fc415a46aa3ae35af17994662e8d72b9d653c
parent77d60d72623250c8c7442acbb98a672da8fe59e9
Linux: Add support for ARPHRD_NONE

So apprently I've been doing this wrong for years - on glibc at
least, getifaddrs(3) never reported a hardware address for
AF_PACKET addresses. Infact, it reported nothing but useless
stats in ifa_data.

I view this as a bug because SIOCGIFHWADDR will get a sockaddr
with a sa_family set correctly. getifaddrs should do the same.
Anyway, if we have the ioctl and no address for the AF_PACKET
"address", call upon the above ioctl to get the correct family
for the interface.

While here, replace if_nametoindex with an ioctl to save libc
from doing it for us.
src/bpf.c
src/duid.c
src/if.c