diff options
author | Jan Engelhardt <jengelh@computergmbh.de> | 2008-04-14 05:15:43 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-04-14 05:15:43 -0400 |
commit | 4abff0775d5e4feb20b21371e1c63a1b30fc2140 (patch) | |
tree | cba00aea0e9f9c8a3daf099c7ebc95de6b14f0f3 /net/ipv4 | |
parent | 72b72949db9aabaafd791a9077f02188a866824d (diff) |
[NETFILTER]: remove arpt_table indirection macro
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/arp_tables.c | 27 | ||||
-rw-r--r-- | net/ipv4/netfilter/arptable_filter.c | 2 |
2 files changed, 14 insertions, 15 deletions
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index 10cc442330c3..34c42c831b18 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c | |||
@@ -222,7 +222,7 @@ unsigned int arpt_do_table(struct sk_buff *skb, | |||
222 | unsigned int hook, | 222 | unsigned int hook, |
223 | const struct net_device *in, | 223 | const struct net_device *in, |
224 | const struct net_device *out, | 224 | const struct net_device *out, |
225 | struct arpt_table *table) | 225 | struct xt_table *table) |
226 | { | 226 | { |
227 | static const char nulldevname[IFNAMSIZ]; | 227 | static const char nulldevname[IFNAMSIZ]; |
228 | unsigned int verdict = NF_DROP; | 228 | unsigned int verdict = NF_DROP; |
@@ -706,7 +706,7 @@ static void get_counters(const struct xt_table_info *t, | |||
706 | } | 706 | } |
707 | } | 707 | } |
708 | 708 | ||
709 | static inline struct xt_counters *alloc_counters(struct arpt_table *table) | 709 | static inline struct xt_counters *alloc_counters(struct xt_table *table) |
710 | { | 710 | { |
711 | unsigned int countersize; | 711 | unsigned int countersize; |
712 | struct xt_counters *counters; | 712 | struct xt_counters *counters; |
@@ -731,13 +731,13 @@ static inline struct xt_counters *alloc_counters(struct arpt_table *table) | |||
731 | } | 731 | } |
732 | 732 | ||
733 | static int copy_entries_to_user(unsigned int total_size, | 733 | static int copy_entries_to_user(unsigned int total_size, |
734 | struct arpt_table *table, | 734 | struct xt_table *table, |
735 | void __user *userptr) | 735 | void __user *userptr) |
736 | { | 736 | { |
737 | unsigned int off, num; | 737 | unsigned int off, num; |
738 | struct arpt_entry *e; | 738 | struct arpt_entry *e; |
739 | struct xt_counters *counters; | 739 | struct xt_counters *counters; |
740 | const struct xt_table_info *private = table->private; | 740 | struct xt_table_info *private = table->private; |
741 | int ret = 0; | 741 | int ret = 0; |
742 | void *loc_cpu_entry; | 742 | void *loc_cpu_entry; |
743 | 743 | ||
@@ -851,7 +851,7 @@ static int compat_table_info(const struct xt_table_info *info, | |||
851 | static int get_info(struct net *net, void __user *user, int *len, int compat) | 851 | static int get_info(struct net *net, void __user *user, int *len, int compat) |
852 | { | 852 | { |
853 | char name[ARPT_TABLE_MAXNAMELEN]; | 853 | char name[ARPT_TABLE_MAXNAMELEN]; |
854 | struct arpt_table *t; | 854 | struct xt_table *t; |
855 | int ret; | 855 | int ret; |
856 | 856 | ||
857 | if (*len != sizeof(struct arpt_getinfo)) { | 857 | if (*len != sizeof(struct arpt_getinfo)) { |
@@ -911,7 +911,7 @@ static int get_entries(struct net *net, struct arpt_get_entries __user *uptr, | |||
911 | { | 911 | { |
912 | int ret; | 912 | int ret; |
913 | struct arpt_get_entries get; | 913 | struct arpt_get_entries get; |
914 | struct arpt_table *t; | 914 | struct xt_table *t; |
915 | 915 | ||
916 | if (*len < sizeof(get)) { | 916 | if (*len < sizeof(get)) { |
917 | duprintf("get_entries: %u < %Zu\n", *len, sizeof(get)); | 917 | duprintf("get_entries: %u < %Zu\n", *len, sizeof(get)); |
@@ -954,7 +954,7 @@ static int __do_replace(struct net *net, const char *name, | |||
954 | void __user *counters_ptr) | 954 | void __user *counters_ptr) |
955 | { | 955 | { |
956 | int ret; | 956 | int ret; |
957 | struct arpt_table *t; | 957 | struct xt_table *t; |
958 | struct xt_table_info *oldinfo; | 958 | struct xt_table_info *oldinfo; |
959 | struct xt_counters *counters; | 959 | struct xt_counters *counters; |
960 | void *loc_cpu_old_entry; | 960 | void *loc_cpu_old_entry; |
@@ -1091,7 +1091,7 @@ static int do_add_counters(struct net *net, void __user *user, unsigned int len, | |||
1091 | const char *name; | 1091 | const char *name; |
1092 | int size; | 1092 | int size; |
1093 | void *ptmp; | 1093 | void *ptmp; |
1094 | struct arpt_table *t; | 1094 | struct xt_table *t; |
1095 | const struct xt_table_info *private; | 1095 | const struct xt_table_info *private; |
1096 | int ret = 0; | 1096 | int ret = 0; |
1097 | void *loc_cpu_entry; | 1097 | void *loc_cpu_entry; |
@@ -1555,7 +1555,7 @@ out: | |||
1555 | } | 1555 | } |
1556 | 1556 | ||
1557 | static int compat_copy_entries_to_user(unsigned int total_size, | 1557 | static int compat_copy_entries_to_user(unsigned int total_size, |
1558 | struct arpt_table *table, | 1558 | struct xt_table *table, |
1559 | void __user *userptr) | 1559 | void __user *userptr) |
1560 | { | 1560 | { |
1561 | struct xt_counters *counters; | 1561 | struct xt_counters *counters; |
@@ -1593,7 +1593,7 @@ static int compat_get_entries(struct net *net, | |||
1593 | { | 1593 | { |
1594 | int ret; | 1594 | int ret; |
1595 | struct compat_arpt_get_entries get; | 1595 | struct compat_arpt_get_entries get; |
1596 | struct arpt_table *t; | 1596 | struct xt_table *t; |
1597 | 1597 | ||
1598 | if (*len < sizeof(get)) { | 1598 | if (*len < sizeof(get)) { |
1599 | duprintf("compat_get_entries: %u < %zu\n", *len, sizeof(get)); | 1599 | duprintf("compat_get_entries: %u < %zu\n", *len, sizeof(get)); |
@@ -1723,9 +1723,8 @@ static int do_arpt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len | |||
1723 | return ret; | 1723 | return ret; |
1724 | } | 1724 | } |
1725 | 1725 | ||
1726 | struct arpt_table *arpt_register_table(struct net *net, | 1726 | struct xt_table *arpt_register_table(struct net *net, struct xt_table *table, |
1727 | struct arpt_table *table, | 1727 | const struct arpt_replace *repl) |
1728 | const struct arpt_replace *repl) | ||
1729 | { | 1728 | { |
1730 | int ret; | 1729 | int ret; |
1731 | struct xt_table_info *newinfo; | 1730 | struct xt_table_info *newinfo; |
@@ -1767,7 +1766,7 @@ out: | |||
1767 | return ERR_PTR(ret); | 1766 | return ERR_PTR(ret); |
1768 | } | 1767 | } |
1769 | 1768 | ||
1770 | void arpt_unregister_table(struct arpt_table *table) | 1769 | void arpt_unregister_table(struct xt_table *table) |
1771 | { | 1770 | { |
1772 | struct xt_table_info *private; | 1771 | struct xt_table_info *private; |
1773 | void *loc_cpu_entry; | 1772 | void *loc_cpu_entry; |
diff --git a/net/ipv4/netfilter/arptable_filter.c b/net/ipv4/netfilter/arptable_filter.c index 629e4951a9b1..9f6526c87757 100644 --- a/net/ipv4/netfilter/arptable_filter.c +++ b/net/ipv4/netfilter/arptable_filter.c | |||
@@ -45,7 +45,7 @@ static struct | |||
45 | .term = ARPT_ERROR_INIT, | 45 | .term = ARPT_ERROR_INIT, |
46 | }; | 46 | }; |
47 | 47 | ||
48 | static struct arpt_table packet_filter = { | 48 | static struct xt_table packet_filter = { |
49 | .name = "filter", | 49 | .name = "filter", |
50 | .valid_hooks = FILTER_VALID_HOOKS, | 50 | .valid_hooks = FILTER_VALID_HOOKS, |
51 | .lock = __RW_LOCK_UNLOCKED(packet_filter.lock), | 51 | .lock = __RW_LOCK_UNLOCKED(packet_filter.lock), |