Maybe better to log

This commit is contained in:
i404788 2019-11-19 22:19:30 +00:00 committed by GitHub
parent 7340b1d6e3
commit 7e07250652
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -257,12 +257,18 @@ bool Init(bool open_adapter)
struct ifaddrs* curaddr = addrs;
while (curaddr)
{
if (strcmp(curaddr->ifa_name, adata->DeviceName) || !curaddr->ifa_addr)
if (strcmp(curaddr->ifa_name, adata->DeviceName)
{
curaddr = curaddr->ifa_next;
continue;
}
if (!curaddr->ifa_addr){
printf("Device does not have an address :/");
curaddr = curaddr->ifa_next;
continue;
}
u16 af = curaddr->ifa_addr->sa_family;
if (af == AF_INET)
{