[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1573620402-10318-2-git-send-email-wenxu@ucloud.cn>
Date: Wed, 13 Nov 2019 12:46:39 +0800
From: wenxu@...oud.cn
To: pablo@...filter.org, davem@...emloft.net
Cc: netfilter-devel@...r.kernel.org, netdev@...r.kernel.org
Subject: [PATCH net-next 1/4] netfilter: flow_table_offload: Fix check ndo_setup_tc when setup_block
From: wenxu <wenxu@...oud.cn>
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@...oud.cn>
---
net/netfilter/nf_flow_table_offload.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/netfilter/nf_flow_table_offload.c b/net/netfilter/nf_flow_table_offload.c
index 9be61f47..1cc6671 100644
--- a/net/netfilter/nf_flow_table_offload.c
+++ b/net/netfilter/nf_flow_table_offload.c
@@ -722,6 +722,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;
--
1.8.3.1
Powered by blists - more mailing lists