diff options
author | Florian Westphal <fw@strlen.de> | 2023-03-14 22:44:53 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-03-14 22:52:45 +0100 |
commit | ad84e8870ef27bfc662edc0caedd74dac82e1c9d (patch) | |
tree | 51ac11a028785579d0415e97b9a164d050dd5e0a | |
parent | e900d40afdb731d2270a5110833ae49192974355 (diff) |
iptables-nft: make builtin tables static
Only used in nft.c.
Signed-off-by: Florian Westphal <fw@strlen.de>
-rw-r--r-- | iptables/nft.c | 6 | ||||
-rw-r--r-- | iptables/nft.h | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/iptables/nft.c b/iptables/nft.c index 5896fd41..5ef5335a 100644 --- a/iptables/nft.c +++ b/iptables/nft.c @@ -434,7 +434,7 @@ static void batch_chain_flush(struct nft_handle *h, } } -const struct builtin_table xtables_ipv4[NFT_TABLE_MAX] = { +static const struct builtin_table xtables_ipv4[NFT_TABLE_MAX] = { [NFT_TABLE_RAW] = { .name = "raw", .type = NFT_TABLE_RAW, @@ -571,7 +571,7 @@ const struct builtin_table xtables_ipv4[NFT_TABLE_MAX] = { #include <linux/netfilter_arp.h> -const struct builtin_table xtables_arp[NFT_TABLE_MAX] = { +static const struct builtin_table xtables_arp[NFT_TABLE_MAX] = { [NFT_TABLE_FILTER] = { .name = "filter", .type = NFT_TABLE_FILTER, @@ -594,7 +594,7 @@ const struct builtin_table xtables_arp[NFT_TABLE_MAX] = { #include <linux/netfilter_bridge.h> -const struct builtin_table xtables_bridge[NFT_TABLE_MAX] = { +static const struct builtin_table xtables_bridge[NFT_TABLE_MAX] = { [NFT_TABLE_FILTER] = { .name = "filter", .type = NFT_TABLE_FILTER, diff --git a/iptables/nft.h b/iptables/nft.h index caff1fde..56005863 100644 --- a/iptables/nft.h +++ b/iptables/nft.h @@ -117,10 +117,6 @@ struct nft_handle { } error; }; -extern const struct builtin_table xtables_ipv4[NFT_TABLE_MAX]; -extern const struct builtin_table xtables_arp[NFT_TABLE_MAX]; -extern const struct builtin_table xtables_bridge[NFT_TABLE_MAX]; - int mnl_talk(struct nft_handle *h, struct nlmsghdr *nlh, int (*cb)(const struct nlmsghdr *nlh, void *data), void *data); |