From ad84e8870ef27bfc662edc0caedd74dac82e1c9d Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Tue, 14 Mar 2023 22:44:53 +0100 Subject: iptables-nft: make builtin tables static Only used in nft.c. Signed-off-by: Florian Westphal --- iptables/nft.c | 6 +++--- 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 -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 -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); -- cgit v1.2.3