From 26877940415158bbba33c944d25af1c37f9d1452 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 19 Jul 2018 18:31:59 +0200 Subject: xtables: arp: make rule_to_cs callback private Since it is not directly called from outside of nft-arp.c anymore, make it private and reduce the overlong name it had. Signed-off-by: Phil Sutter Signed-off-by: Florian Westphal --- iptables/nft-arp.c | 10 +++++----- iptables/nft-arp.h | 3 --- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'iptables') diff --git a/iptables/nft-arp.c b/iptables/nft-arp.c index 164c3971..a6241498 100644 --- a/iptables/nft-arp.c +++ b/iptables/nft-arp.c @@ -365,8 +365,8 @@ static void nft_arp_parse_payload(struct nft_xt_ctx *ctx, } } -void nft_rule_to_arptables_command_state(const struct nftnl_rule *r, - struct iptables_command_state *cs) +static void nft_arp_rule_to_cs(const struct nftnl_rule *r, + struct iptables_command_state *cs) { struct nftnl_expr_iter *iter; struct nftnl_expr *expr; @@ -583,7 +583,7 @@ nft_arp_print_firewall(struct nftnl_rule *r, unsigned int num, { struct iptables_command_state cs = {}; - nft_rule_to_arptables_command_state(r, &cs); + nft_arp_rule_to_cs(r, &cs); if (format & FMT_LINENUMBERS) printf("%u ", num); @@ -641,7 +641,7 @@ static bool nft_arp_rule_find(struct nft_family_ops *ops, struct nftnl_rule *r, struct iptables_command_state this = {}; /* Delete by matching rule case */ - nft_rule_to_arptables_command_state(r, &this); + nft_arp_rule_to_cs(r, &this); if (!nft_arp_is_same(&cs->arp, &this.arp)) return false; @@ -667,7 +667,7 @@ struct nft_family_ops nft_family_ops_arp = { .save_firewall = NULL, .save_counters = NULL, .post_parse = NULL, - .rule_to_cs = nft_rule_to_arptables_command_state, + .rule_to_cs = nft_arp_rule_to_cs, .clear_cs = NULL, .rule_find = nft_arp_rule_find, .parse_target = nft_arp_parse_target, diff --git a/iptables/nft-arp.h b/iptables/nft-arp.h index e33bb748..da6bd380 100644 --- a/iptables/nft-arp.h +++ b/iptables/nft-arp.h @@ -4,7 +4,4 @@ extern char *opcodes[]; #define NUMOPCODES 9 -void nft_rule_to_arptables_command_state(const struct nftnl_rule *r, - struct iptables_command_state *cs); - #endif -- cgit v1.2.3