diff options
author | Phil Sutter <phil@nwl.cc> | 2018-07-19 18:31:59 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2018-07-19 23:06:40 +0200 |
commit | 26877940415158bbba33c944d25af1c37f9d1452 (patch) | |
tree | effe8b3be56d1491335179a2ccf607bb04d944b8 /iptables | |
parent | 1bf73c4227459393029ab7b124ba74fe853d9413 (diff) |
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 <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables')
-rw-r--r-- | iptables/nft-arp.c | 10 | ||||
-rw-r--r-- | iptables/nft-arp.h | 3 |
2 files changed, 5 insertions, 8 deletions
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 |