diff options
author | Kelvie Wong <kelvie@ieee.org> | 2012-05-02 14:39:23 +0000 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-05-07 21:08:27 +0200 |
commit | f434c7097de045c4024b3f3a7dd5349820e3027d (patch) | |
tree | ebcb0500b88bdc50d444250af7b2f0b15cd9ba53 /src/expect/api.c | |
parent | 162b883a6a36aa926f34186d5a2ac8b7930e8d3b (diff) |
expect: support NFCT_Q_CREATE_UPDATE in nfexp_query
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>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/expect/api.c')
-rw-r--r-- | src/expect/api.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |