Skip to content

Commit

Permalink
netfilter: nf_tables: dump NFTA_CHAIN_FLAGS attribute
Browse files Browse the repository at this point in the history
commit d78008d upstream.

Missing NFTA_CHAIN_FLAGS netlink attribute when dumping basechain
definitions.

Fixes: c9626a2 ("netfilter: nf_tables: add hardware offload support")
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
ummakynes authored and gregkh committed Mar 18, 2020
1 parent faad112 commit fb99a32
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/netfilter/nf_tables_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit fb99a32

Please sign in to comment.