netfilter: nf_tables: bail out early if hardware offload is not supported
[ Upstream commit3a41c64d9c
] If user requests for NFT_CHAIN_HW_OFFLOAD, then check if either device provides the .ndo_setup_tc interface or there is an indirect flow block that has been registered. Otherwise, bail out early from the preparation phase. Moreover, validate that family == NFPROTO_NETDEV and hook is NF_NETDEV_INGRESS. Fixes:c9626a2cbd
("netfilter: nf_tables: add hardware offload support") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
330c0c6cd2
commit
86c87d2c03
@ -566,3 +566,9 @@ int flow_indr_dev_setup_offload(struct net_device *dev, struct Qdisc *sch,
|
||||
return list_empty(&bo->cb_list) ? -EOPNOTSUPP : 0;
|
||||
}
|
||||
EXPORT_SYMBOL(flow_indr_dev_setup_offload);
|
||||
|
||||
bool flow_indr_dev_exists(void)
|
||||
{
|
||||
return !list_empty(&flow_block_indr_dev_list);
|
||||
}
|
||||
EXPORT_SYMBOL(flow_indr_dev_exists);
|
||||
|
Reference in New Issue
Block a user