diff options
author | Tomasz Bursztyka | 2013-12-12 14:00:42 +0100 |
---|---|---|
committer | Pablo Neira Ayuso | 2013-12-17 14:28:05 +0100 |
commit | d8bcc768c80e73cf4e948cb327949174b4b5b9e7 (patch) | |
tree | 18be32c57d81b76d31933c7cd60142ebdb21c0c2 /net/netfilter | |
parent | netfilter: nft: add queue module (diff) | |
download | kernel-qcow2-linux-d8bcc768c80e73cf4e948cb327949174b4b5b9e7.tar.gz kernel-qcow2-linux-d8bcc768c80e73cf4e948cb327949174b4b5b9e7.tar.xz kernel-qcow2-linux-d8bcc768c80e73cf4e948cb327949174b4b5b9e7.zip |
netfilter: nf_tables: Expose the table usage counter via netlink
Userspace can therefore know whether a table is in use or not, and
by how many chains. Suggested by Pablo Neira Ayuso.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/nf_tables_api.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index dcddc49c0e08..604512d523f7 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -180,7 +180,8 @@ static int nf_tables_fill_table_info(struct sk_buff *skb, u32 portid, u32 seq, nfmsg->res_id = 0; if (nla_put_string(skb, NFTA_TABLE_NAME, table->name) || - nla_put_be32(skb, NFTA_TABLE_FLAGS, htonl(table->flags))) + nla_put_be32(skb, NFTA_TABLE_FLAGS, htonl(table->flags)) || + nla_put_be32(skb, NFTA_TABLE_USE, htonl(table->use))) goto nla_put_failure; return nlmsg_end(skb, nlh); |