It is not necessary to check the remaining msg buffer coming from the kernel
when already the correct mac address was found.

Signed-off-by: Sven Eckelmann <[email protected]>
---
 functions.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/functions.c b/functions.c
index 959784b..f2b23f2 100644
--- a/functions.c
+++ b/functions.c
@@ -683,6 +683,7 @@ static struct ether_addr *resolve_mac_from_cache(int 
ai_family,
                        if (parsed) {
                                if (memcmp(&l3addr_tmp, l3addr, l3_len) == 0) {
                                        mac_result = &mac_tmp;
+                                       finished = 1;
                                        break;
                                }
                        }
-- 
1.8.4.rc3

Reply via email to