netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
To: netfilter-devel@vger.kernel.org
Cc: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Subject: [PATCH 1/5] netfilter: nf_tables: Stack expression type depending on their family
Date: Mon, 14 Apr 2014 15:41:26 +0300	[thread overview]
Message-ID: <1397479290-6967-2-git-send-email-tomasz.bursztyka@linux.intel.com> (raw)
In-Reply-To: <1397479290-6967-1-git-send-email-tomasz.bursztyka@linux.intel.com>

To ensure family tight expression gets selected in priority to family
agnostic ones.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
---
 net/netfilter/nf_tables_api.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 33045a5..700a522 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -1093,7 +1093,10 @@ static void nft_ctx_init(struct nft_ctx *ctx,
 int nft_register_expr(struct nft_expr_type *type)
 {
 	nfnl_lock(NFNL_SUBSYS_NFTABLES);
-	list_add_tail(&type->list, &nf_tables_expressions);
+	if (type->family == NFPROTO_UNSPEC)
+		list_add_tail(&type->list, &nf_tables_expressions);
+	else
+		list_add(&type->list, &nf_tables_expressions);
 	nfnl_unlock(NFNL_SUBSYS_NFTABLES);
 	return 0;
 }
-- 
1.8.3.2


  reply	other threads:[~2014-04-14 12:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-14 12:41 [PATCH v4 0/5] Add suport for bridge if dev name meta expression keys Tomasz Bursztyka
2014-04-14 12:41 ` Tomasz Bursztyka [this message]
2014-04-14 12:41 ` [PATCH 2/5] netfilter: nf_tables: Make meta expression core functions public Tomasz Bursztyka
2014-04-14 12:41 ` [PATCH 3/5] netfilter: nf_tables: Add meta expression key for bridge interface name Tomasz Bursztyka
2014-04-23 12:03   ` Pablo Neira Ayuso
2014-04-24  6:08     ` Tomasz Bursztyka
2014-04-24  8:38       ` Pablo Neira Ayuso
2014-04-14 12:41 ` [PATCH libnftnl 4/5] meta: Add support for input and output " Tomasz Bursztyka
2014-04-14 12:41 ` [PATCH 5/5] " Tomasz Bursztyka
  -- strict thread matches above, loose matches on Subject: below --
2014-04-08 11:25 [PATCH v3 0/5] Add suport for bridge if dev name meta exepression keys Tomasz Bursztyka
2014-04-08 11:25 ` [PATCH 1/5] netfilter: nf_tables: Stack expression type depending on their family Tomasz Bursztyka
2014-04-04  9:47 [PATCH v2 0/4] Add suport for bridge if dev name meta exepression keys Tomasz Bursztyka
2014-04-04  9:47 ` [PATCH 1/5] netfilter: nf_tables: Stack expression type depending on their family Tomasz Bursztyka
2014-03-27 12:47 [PATCH 0/5] Add suport for bridge if dev name meta exepression keys Tomasz Bursztyka
2014-03-27 12:47 ` [PATCH 1/5] netfilter: nf_tables: Stack expression type depending on their family Tomasz Bursztyka

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=1397479290-6967-2-git-send-email-tomasz.bursztyka@linux.intel.com \
    --to=tomasz.bursztyka@linux.intel.com \
    --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).