]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables-nft: make builtin tables static
authorFlorian Westphal <fw@strlen.de>
Tue, 14 Mar 2023 21:44:53 +0000 (22:44 +0100)
committerFlorian Westphal <fw@strlen.de>
Tue, 14 Mar 2023 21:52:45 +0000 (22:52 +0100)
Only used in nft.c.

Signed-off-by: Florian Westphal <fw@strlen.de>
iptables/nft.c
iptables/nft.h

index 5896fd410ca78e6b0cb8bfe73a25e55c13ad37f3..5ef5335a24c1a6ebf5c9b0967e7905e817104962 100644 (file)
@@ -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,
index caff1fdeff92e7462624e81ce454317a53eecb01..56005863ed4c44c605278d815773ec059666a142 100644 (file)
@@ -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);