Skip to content

Commit ea13ca3

Browse files
wenxuummakynes
authored andcommitted
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: c29f74e ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: wenxu <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 28f8bfd commit ea13ca3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/netfilter/nf_flow_table_offload.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,9 @@ int nf_flow_table_offload_setup(struct nf_flowtable *flowtable,
812812
if (!(flowtable->flags & NF_FLOWTABLE_HW_OFFLOAD))
813813
return 0;
814814

815+
if (!dev->netdev_ops->ndo_setup_tc)
816+
return -EOPNOTSUPP;
817+
815818
bo.net = dev_net(dev);
816819
bo.block = &flowtable->flow_block;
817820
bo.command = cmd;

0 commit comments

Comments
 (0)