aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Fernandez Mancera <ffmancera@riseup.net>2018-10-10 03:56:09 -0400
committerPablo Neira Ayuso <pablo@netfilter.org>2018-10-11 05:29:14 -0400
commit4a3e71b7b7dbaf3562be9d508260935aa13cb48b (patch)
tree05cdba11298fb4f3bc7c39abf1d36e818e01761a
parent3b18d5eba491b2328b31efa4235724a2354af010 (diff)
netfilter: nft_osf: usage from output path is not valid
The nft_osf extension, like xt_osf, is not supported from the output path. Fixes: b96af92d6eaf ("netfilter: nf_tables: implement Passive OS fingerprint module in nft_osf") Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--net/netfilter/nft_osf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/netfilter/nft_osf.c b/net/netfilter/nft_osf.c
index a35fb59ace73..df4e3e0412ed 100644
--- a/net/netfilter/nft_osf.c
+++ b/net/netfilter/nft_osf.c
@@ -69,6 +69,15 @@ nla_put_failure:
69 return -1; 69 return -1;
70} 70}
71 71
72static int nft_osf_validate(const struct nft_ctx *ctx,
73 const struct nft_expr *expr,
74 const struct nft_data **data)
75{
76 return nft_chain_validate_hooks(ctx->chain, (1 << NF_INET_LOCAL_IN) |
77 (1 << NF_INET_PRE_ROUTING) |
78 (1 << NF_INET_FORWARD));
79}
80
72static struct nft_expr_type nft_osf_type; 81static struct nft_expr_type nft_osf_type;
73static const struct nft_expr_ops nft_osf_op = { 82static const struct nft_expr_ops nft_osf_op = {
74 .eval = nft_osf_eval, 83 .eval = nft_osf_eval,
@@ -76,6 +85,7 @@ static const struct nft_expr_ops nft_osf_op = {
76 .init = nft_osf_init, 85 .init = nft_osf_init,
77 .dump = nft_osf_dump, 86 .dump = nft_osf_dump,
78 .type = &nft_osf_type, 87 .type = &nft_osf_type,
88 .validate = nft_osf_validate,
79}; 89};
80 90
81static struct nft_expr_type nft_osf_type __read_mostly = { 91static struct nft_expr_type nft_osf_type __read_mostly = {