Commit ea13ca30 authored by wenxu's avatar wenxu Committed by Pablo Neira Ayuso

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: c29f74e0 ("netfilter: nf_flow_table: hardware offload support")
Signed-off-by: default avatarwenxu <wenxu@ucloud.cn>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 28f8bfd1
...@@ -812,6 +812,9 @@ int nf_flow_table_offload_setup(struct nf_flowtable *flowtable, ...@@ -812,6 +812,9 @@ int nf_flow_table_offload_setup(struct nf_flowtable *flowtable,
if (!(flowtable->flags & NF_FLOWTABLE_HW_OFFLOAD)) if (!(flowtable->flags & NF_FLOWTABLE_HW_OFFLOAD))
return 0; return 0;
if (!dev->netdev_ops->ndo_setup_tc)
return -EOPNOTSUPP;
bo.net = dev_net(dev); bo.net = dev_net(dev);
bo.block = &flowtable->flow_block; bo.block = &flowtable->flow_block;
bo.command = cmd; bo.command = cmd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment