From 25a1d0683497d675d20be81f1fe57264c248a813 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 20 May 2023 22:20:42 +0200 Subject: [PATCH] Query IPv4-capable interfaces instead of packet-interfaces when scanning for DHCP servers Signed-off-by: DL6ER --- src/tools/dhcp-discover.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/dhcp-discover.c b/src/tools/dhcp-discover.c index 18b415b3..91a6189f 100644 --- a/src/tools/dhcp-discover.c +++ b/src/tools/dhcp-discover.c @@ -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) {