netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* netfilter: ipset: fix incorret comparison in hash_netnet4_data_equal()
@ 2013-11-14 15:41 Dave Jones
  2013-11-25 21:45 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 6+ messages in thread
From: Dave Jones @ 2013-11-14 15:41 UTC (permalink / raw)
  To: netdev; +Cc: oliver

Both sides of the comparison are the same, looks like a cut-and-paste error.

Spotted by Coverity.

Signed-off-by: Dave Jones <davej@fedoraproject.org>

diff --git a/net/netfilter/ipset/ip_set_hash_netnet.c b/net/netfilter/ipset/ip_set_hash_netnet.c
index 2bc2dec20b00..6226803fc490 100644
--- a/net/netfilter/ipset/ip_set_hash_netnet.c
+++ b/net/netfilter/ipset/ip_set_hash_netnet.c
@@ -59,7 +59,7 @@ hash_netnet4_data_equal(const struct hash_netnet4_elem *ip1,
 		     u32 *multi)
 {
 	return ip1->ipcmp == ip2->ipcmp &&
-	       ip2->ccmp == ip2->ccmp;
+	       ip1->ccmp == ip2->ccmp;
 }
 
 static inline int

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-12-08  9:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-14 15:41 netfilter: ipset: fix incorret comparison in hash_netnet4_data_equal() Dave Jones
2013-11-25 21:45 ` Pablo Neira Ayuso
2013-12-07 12:23   ` Oliver
2013-12-07 19:53     ` Jozsef Kadlecsik
2013-12-07 22:34       ` Pablo Neira Ayuso
2013-12-08  9:31         ` Jozsef Kadlecsik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).