diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2023-11-01 18:25:15 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2023-11-06 12:42:32 +0100 |
commit | f5b07efee7ec2ba09b38831773f9b3622d958072 (patch) | |
tree | ce6bbaf9111de7e6815d2f0284ecf3de6dd3e0d6 | |
parent | 85a4e32d1b0f804b1982535ee16daa560949e611 (diff) |
Fixed invalid use of `SIOCAIFADDR` for `ioctl()`.
* `SIOCGIFALIAS` is the desired one
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r-- | nDPId.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1069,7 +1069,7 @@ static int get_ip4_address_and_netmask(char const * const ifa_name, size_t ifnam #if defined(__FreeBSD__) || defined(__APPLE__) memcpy(ifr.ifra_name, ifa_name, ifnamelen); ifr.ifra_name[ifnamelen] = '\0'; - if (ioctl(sock, SIOCAIFADDR, &ifr) == -1) + if (ioctl(sock, SIOCGIFALIAS, &ifr) == -1) #else memcpy(ifr.ifr_name, ifa_name, ifnamelen); ifr.ifr_name[ifnamelen] = '\0'; |