netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH 5/7] netfilter: ipset: Validate the set family and not the set type family at swapping
Date: Wed, 18 Sep 2013 00:07:32 +0200	[thread overview]
Message-ID: <1379455654-3905-6-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1379455654-3905-1-git-send-email-pablo@netfilter.org>

From: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>

This closes netfilter bugzilla #843, reported by Quentin Armitage.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
---
 net/netfilter/ipset/ip_set_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c
index c8c303c..f2e30fb 100644
--- a/net/netfilter/ipset/ip_set_core.c
+++ b/net/netfilter/ipset/ip_set_core.c
@@ -1052,7 +1052,7 @@ ip_set_swap(struct sock *ctnl, struct sk_buff *skb,
 	 * Not an artificial restriction anymore, as we must prevent
 	 * possible loops created by swapping in setlist type of sets. */
 	if (!(from->type->features == to->type->features &&
-	      from->type->family == to->type->family))
+	      from->family == to->family))
 		return -IPSET_ERR_TYPE_MISMATCH;
 
 	strncpy(from_name, from->name, IPSET_MAXNAMELEN);
-- 
1.7.10.4

  parent reply	other threads:[~2013-09-17 22:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-17 22:07 [PATCH 0/7] netfilter fixes for net Pablo Neira Ayuso
2013-09-17 22:07 ` [PATCH 1/7] netfilter: nf_conntrack: use RCU safe kfree for conntrack extensions Pablo Neira Ayuso
2013-09-17 22:07 ` [PATCH 2/7] netfilter: nf_nat_proto_icmpv6:: fix wrong comparison in icmpv6_manip_pkt Pablo Neira Ayuso
2013-09-17 22:07 ` [PATCH 3/7] netfilter: ipset: Skip really non-first fragments for IPv6 when getting port/protocol Pablo Neira Ayuso
2013-09-17 22:07 ` [PATCH 4/7] netfilter: ipset: Consistent userspace testing with nomatch flag Pablo Neira Ayuso
2013-09-17 22:07 ` Pablo Neira Ayuso [this message]
2013-09-17 22:07 ` [PATCH 6/7] netfilter: ipset: Fix serious failure in CIDR tracking Pablo Neira Ayuso
2013-09-17 22:07 ` [PATCH 7/7] netfilter: nfnetlink_queue: use network skb for sequence adjustment Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1379455654-3905-6-git-send-email-pablo@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).