projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28f8bfd
)
netfilter: nf_flow_table_offload: Fix check ndo_setup_tc when setup_block
author
wenxu
<wenxu@ucloud.cn>
Wed, 13 Nov 2019 04:46:39 +0000
(12:46 +0800)
committer
Pablo Neira Ayuso
<pablo@netfilter.org>
Fri, 15 Nov 2019 22:44:49 +0000
(23:44 +0100)
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>
net/netfilter/nf_flow_table_offload.c
patch
|
blob
|
history
diff --git
a/net/netfilter/nf_flow_table_offload.c
b/net/netfilter/nf_flow_table_offload.c
index a14932748bcf0bb9da9c6bc1097518bfe2fbfcf5..c54c9a6cc981ba6a7e0a6140763946460b11adb4 100644
(file)
--- 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;