summaryrefslogtreecommitdiff
path: root/net/netfilter
diff options
context:
space:
mode:
authorwenxu <wenxu@ucloud.cn>2019-11-13 12:46:39 +0800
committerPablo Neira Ayuso <pablo@netfilter.org>2019-11-15 23:44:49 +0100
commitea13ca305177bd02de62087228a9f1e6793ccf2b (patch)
tree4d8685dd333dbb7bace90088894b045c474b1ec2 /net/netfilter
parent28f8bfd1ac948403ebd5c8070ae1e25421560059 (diff)
netfilter: nf_flow_table_offload: Fix check ndo_setup_tc when setup_block
It should check the ndo_setup_tc in the nf_flow_table_offload_setup. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: wenxu <wenxu@ucloud.cn> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nf_flow_table_offload.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/netfilter/nf_flow_table_offload.c b/net/netfilter/nf_flow_table_offload.c
index a14932748bcf..c54c9a6cc981 100644
--- a/net/netfilter/nf_flow_table_offload.c
+++ b/net/netfilter/nf_flow_table_offload.c
@@ -812,6 +812,9 @@ int nf_flow_table_offload_setup(struct nf_flowtable *flowtable,
if (!(flowtable->flags & NF_FLOWTABLE_HW_OFFLOAD))
return 0;
+ if (!dev->netdev_ops->ndo_setup_tc)
+ return -EOPNOTSUPP;
+
bo.net = dev_net(dev);
bo.block = &flowtable->flow_block;
bo.command = cmd;