netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kelvie Wong <kelvie@ieee.org>
To: netfilter-devel@vger.kernel.org
Cc: Kelvie Wong <kelvie@ieee.org>
Subject: [PATCH] expect: support NFCT_Q_CREATE_UPDATE in nfexp_query
Date: Wed,  2 May 2012 17:39:23 -0700	[thread overview]
Message-ID: <1336005564-23171-2-git-send-email-kelvie@ieee.org> (raw)
In-Reply-To: <1336005564-23171-1-git-send-email-kelvie@ieee.org>

This will work as it does in conntrack; it won't pass NLM_F_ACK into
ctnetlink_new_expect in the kernel, and will thus invoke
ctnetlink_change_expect if the expectation already exists.

Signed-off-by: Kelvie Wong <kelvie@ieee.org>
---
 src/expect/api.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/expect/api.c b/src/expect/api.c
index 4da44a0..a101042 100644
--- a/src/expect/api.c
+++ b/src/expect/api.c
@@ -533,6 +533,9 @@ __build_query_exp(struct nfnl_subsys_handle *ssh,
 	case NFCT_Q_CREATE:
 		__build_expect(ssh, req, size, IPCTNL_MSG_EXP_NEW, NLM_F_REQUEST|NLM_F_CREATE|NLM_F_ACK|NLM_F_EXCL, data);
 		break;
+	case NFCT_Q_CREATE_UPDATE:
+		__build_expect(ssh, req, size, IPCTNL_MSG_EXP_NEW, NLM_F_REQUEST|NLM_F_CREATE|NLM_F_ACK, data);
+		break;
 	case NFCT_Q_GET:
 		__build_expect(ssh, req, size, IPCTNL_MSG_EXP_GET, NLM_F_REQUEST|NLM_F_ACK, data);
 		break;
-- 
1.7.9.5


  reply	other threads:[~2012-05-03  0:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-03  0:39 [RFC] Patches to allow updates of timeouts in expectations Kelvie Wong
2012-05-03  0:39 ` Kelvie Wong [this message]
2012-05-03  0:39 ` [PATCH] netfilter: nf_ct_expect: partially implement ctnetlink_change_expect Kelvie Wong
2012-05-06 23:09   ` Pablo Neira Ayuso
2012-05-07  1:51     ` Kelvie Wong
2012-05-07  1:53       ` Kelvie Wong
2012-05-07  8:42       ` Pablo Neira Ayuso
2012-05-07 16:28         ` Kelvie Wong
2012-05-07 16:43           ` Kelvie Wong
2012-05-07 18:54             ` 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=1336005564-23171-2-git-send-email-kelvie@ieee.org \
    --to=kelvie@ieee.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).