]> git.baikalelectronics.ru Git - kernel.git/commitdiff
netfilter: nf_tables: dump NFTA_CHAIN_FLAGS attribute
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 3 Mar 2020 14:02:45 +0000 (15:02 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 5 Mar 2020 10:35:57 +0000 (11:35 +0100)
Missing NFTA_CHAIN_FLAGS netlink attribute when dumping basechain
definitions.

Fixes: 5b0ceb7358a3 ("netfilter: nf_tables: add hardware offload support")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c

index bb064aa4154b491762309524b25c23c25cf56199..f9e60981bd3618c2e068070626fa2af0323bab2e 100644 (file)
@@ -1405,6 +1405,11 @@ static int nf_tables_fill_chain_info(struct sk_buff *skb, struct net *net,
                                              lockdep_commit_lock_is_held(net));
                if (nft_dump_stats(skb, stats))
                        goto nla_put_failure;
+
+               if ((chain->flags & NFT_CHAIN_HW_OFFLOAD) &&
+                   nla_put_be32(skb, NFTA_CHAIN_FLAGS,
+                                htonl(NFT_CHAIN_HW_OFFLOAD)))
+                       goto nla_put_failure;
        }
 
        if (nla_put_be32(skb, NFTA_CHAIN_USE, htonl(chain->use)))