lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 22 Nov 2012 09:51:15 +0100
From:	Jan Synacek <jsynacek@...hat.com>
To:	yoshfuji@...ux-ipv6.org
Cc:	netdev@...r.kernel.org, Jan Synacek <jsynacek@...hat.com>
Subject: [PATCH] arping: Fix find_device_by_ifaddrs()

Look for another device if the device name and the currently found one are the
same, not different.

Also, make checking for the device's flags nonfatal.

Signed-off-by: Jan Synacek <jsynacek@...hat.com>
---
 arping.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arping.c b/arping.c
index ff77bec..d0edccf 100644
--- a/arping.c
+++ b/arping.c
@@ -550,10 +550,10 @@ static int find_device_by_ifaddrs(void)
 			continue;
 		if (ifa->ifa_addr->sa_family != AF_PACKET)
 			continue;
-		if (device.name && ifa->ifa_name && strcmp(ifa->ifa_name, device.name))
+		if (device.name && ifa->ifa_name && !strcmp(ifa->ifa_name, device.name))
 			continue;
 
-		if (check_ifflags(ifa->ifa_flags, device.name != NULL) < 0)
+		if (check_ifflags(ifa->ifa_flags, 0) < 0)
 			continue;
 
 		if (!((struct sockaddr_ll *)ifa->ifa_addr)->sll_halen)
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ