Query IPv4-capable interfaces instead of packet-interfaces when scanning for DHCP servers

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2023-05-20 22:20:42 +02:00
parent aa8821adbc
commit 25a1d06834
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD
1 changed files with 2 additions and 2 deletions

View File

@ -760,8 +760,8 @@ int run_dhcp_discover(void)
int tid = 0;
while(tmp != NULL && tid < MAXTHREADS)
{
// Create a thread for interfaces of type AF_PACKET
if(tmp->ifa_addr && tmp->ifa_addr->sa_family == AF_PACKET)
// Create a thread for interfaces of type AF_INET (IPv4)
if(tmp->ifa_addr && tmp->ifa_addr->sa_family == AF_INET)
{
if(pthread_create(&scanthread[tid], &attr, dhcp_discover_iface, tmp ) != 0)
{