Maybe better to log
This commit is contained in:
parent
7340b1d6e3
commit
7e07250652
|
@ -257,12 +257,18 @@ bool Init(bool open_adapter)
|
||||||
struct ifaddrs* curaddr = addrs;
|
struct ifaddrs* curaddr = addrs;
|
||||||
while (curaddr)
|
while (curaddr)
|
||||||
{
|
{
|
||||||
if (strcmp(curaddr->ifa_name, adata->DeviceName) || !curaddr->ifa_addr)
|
if (strcmp(curaddr->ifa_name, adata->DeviceName)
|
||||||
{
|
{
|
||||||
curaddr = curaddr->ifa_next;
|
curaddr = curaddr->ifa_next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!curaddr->ifa_addr){
|
||||||
|
printf("Device does not have an address :/");
|
||||||
|
curaddr = curaddr->ifa_next;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
u16 af = curaddr->ifa_addr->sa_family;
|
u16 af = curaddr->ifa_addr->sa_family;
|
||||||
if (af == AF_INET)
|
if (af == AF_INET)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue