diff mbox

netfilter: ipset: fix incorret comparison in hash_netnet4_data_equal()

Message ID 20131114154101.GA22625@redhat.com
State Awaiting Upstream, archived
Delegated to: David Miller
Headers show

Commit Message

Dave Jones Nov. 14, 2013, 3:41 p.m. UTC
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>

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

Comments

Pablo Neira Ayuso Nov. 25, 2013, 9:45 p.m. UTC | #1
On Thu, Nov 14, 2013 at 10:41:01AM -0500, Dave Jones wrote:
> Both sides of the comparison are the same, looks like a cut-and-paste error.
> 
> Spotted by Coverity.

Applied, thanks Dave.

Please, cc netfilter-devel for netfilter patches next time.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Oliver Smith Dec. 7, 2013, 12:23 p.m. UTC | #2
On Monday 25 November 2013 22:45:11 Pablo Neira Ayuso wrote:
> On Thu, Nov 14, 2013 at 10:41:01AM -0500, Dave Jones wrote:
> > Both sides of the comparison are the same, looks like a cut-and-paste
> > error.

Just a typo unfortunately.

The change should definitely make its way into mainline before 3.13 gets 
released - is it on track to be pulled into davem's net tree or should I get 
that sorted out myself?

Cheers,
Oliver.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jozsef Kadlecsik Dec. 7, 2013, 7:53 p.m. UTC | #3
On Sat, 7 Dec 2013, Oliver wrote:

> On Monday 25 November 2013 22:45:11 Pablo Neira Ayuso wrote:
> > On Thu, Nov 14, 2013 at 10:41:01AM -0500, Dave Jones wrote:
> > > Both sides of the comparison are the same, looks like a cut-and-paste
> > > error.
> 
> Just a typo unfortunately.
> 
> The change should definitely make its way into mainline before 3.13 gets 
> released - is it on track to be pulled into davem's net tree or should I 
> get that sorted out myself?

I'm going to submit the patch to Pablo at the beginning of next week, so 
it'll follow the normal track.

Best regards,
Jozsef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.mta.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
          H-1525 Budapest 114, POB. 49, Hungary
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pablo Neira Ayuso Dec. 7, 2013, 10:34 p.m. UTC | #4
On Sat, Dec 07, 2013 at 08:53:52PM +0100, Jozsef Kadlecsik wrote:
> On Sat, 7 Dec 2013, Oliver wrote:
> 
> > On Monday 25 November 2013 22:45:11 Pablo Neira Ayuso wrote:
> > > On Thu, Nov 14, 2013 at 10:41:01AM -0500, Dave Jones wrote:
> > > > Both sides of the comparison are the same, looks like a cut-and-paste
> > > > error.
> > 
> > Just a typo unfortunately.
> > 
> > The change should definitely make its way into mainline before 3.13 gets 
> > released - is it on track to be pulled into davem's net tree or should I 
> > get that sorted out myself?
> 
> I'm going to submit the patch to Pablo at the beginning of next week, so 
> it'll follow the normal track.

JFYI, I applied this already:

http://www.spinics.net/lists/netfilter-devel/msg29031.html

If unsure, please check my tree:

http://git.kernel.org/cgit/linux/kernel/git/pablo/nf.git/
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jozsef Kadlecsik Dec. 8, 2013, 9:31 a.m. UTC | #5
On Sat, 7 Dec 2013, Pablo Neira Ayuso wrote:

> On Sat, Dec 07, 2013 at 08:53:52PM +0100, Jozsef Kadlecsik wrote:
> > On Sat, 7 Dec 2013, Oliver wrote:
> > 
> > > On Monday 25 November 2013 22:45:11 Pablo Neira Ayuso wrote:
> > > > On Thu, Nov 14, 2013 at 10:41:01AM -0500, Dave Jones wrote:
> > > > > Both sides of the comparison are the same, looks like a cut-and-paste
> > > > > error.
> > > 
> > > Just a typo unfortunately.
> > > 
> > > The change should definitely make its way into mainline before 3.13 gets 
> > > released - is it on track to be pulled into davem's net tree or should I 
> > > get that sorted out myself?
> > 
> > I'm going to submit the patch to Pablo at the beginning of next week, so 
> > it'll follow the normal track.
> 
> JFYI, I applied this already:
> 
> http://www.spinics.net/lists/netfilter-devel/msg29031.html
> 
> If unsure, please check my tree:
> 
> http://git.kernel.org/cgit/linux/kernel/git/pablo/nf.git/

Great, thanks indeed!

Best regards,
Jozsef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.mta.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
          H-1525 Budapest 114, POB. 49, Hungary
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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