Userspace can therefore know whether a table is in use or not, and by how many chains. Suggested by Pablo Neira Ayuso.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -110,11 +110,13 @@ enum nft_table_flags { · 109 unmodified lines | ||
| 110 | 110 | * |
| 111 | 111 | * @NFTA_TABLE_NAME: name of the table (NLA_STRING) |
| 112 | 112 | * @NFTA_TABLE_FLAGS: bitmask of enum nft_table_flags (NLA_U32) |
| 113 | + * @NFTA_TABLE_USE: number of chains in this table (NLA_U32) | |
| 113 | 114 | */ |
| 114 | 115 | enum nft_table_attributes { |
| 115 | 116 | NFTA_TABLE_UNSPEC, |
| 116 | 117 | NFTA_TABLE_NAME, |
| 117 | 118 | NFTA_TABLE_FLAGS, |
| 119 | + NFTA_TABLE_USE, | |
| 118 | 120 | __NFTA_TABLE_MAX |
| 119 | 121 | }; |
| 120 | 122 | #define NFTA_TABLE_MAX (__NFTA_TABLE_MAX - 1) |