summaryrefslogtreecommitdiffstats
path: root/include/nftables.h
diff options
context:
space:
mode:
authorLaurent Fasnacht <fasnacht@protonmail.ch>2020-02-10 10:17:21 +0000
committerPablo Neira Ayuso <pablo@netfilter.org>2020-02-11 00:25:18 +0100
commit209c4d901e90e46faa14d1f38cb000f79514b3b2 (patch)
treebfd880bde7a91a2ddff9435e1da7180a9d6e716b /include/nftables.h
parent556c5a94b8067f33ef0a42836753dae0736b7524 (diff)
scanner: move the file descriptor to be in the input_descriptor structure
This prevents a static allocation of file descriptors array, thus allows more flexibility. Signed-off-by: Laurent Fasnacht <fasnacht@protonmail.ch> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/nftables.h')
-rw-r--r--include/nftables.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/nftables.h b/include/nftables.h
index 90d33196..07726e4d 100644
--- a/include/nftables.h
+++ b/include/nftables.h
@@ -122,7 +122,6 @@ struct nft_ctx {
void *scanner;
struct scope *top_scope;
void *json_root;
- FILE *f[MAX_INCLUDE_DEPTH];
};
enum nftables_exit_codes {
@@ -176,6 +175,7 @@ enum input_descriptor_types {
* struct input_descriptor
*
* @location: location, used for include statements
+ * @f: file descriptor
* @type: input descriptor type
* @name: name describing the input
* @union: buffer or file descriptor, depending on type
@@ -186,6 +186,7 @@ enum input_descriptor_types {
*/
struct input_descriptor {
struct list_head list;
+ FILE *f;
struct location location;
enum input_descriptor_types type;
const char *name;