Re: [PATCH 07/29] [NETFILTER]: remove arpt_table indirection macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wednesday 2008-03-26 21:35, Patrick McHardy wrote:
Jan Engelhardt wrote:
 Signed-off-by: Jan Engelhardt <jengelh@xxxxxxxxxxxxxxx>

Applied, but this triggered some warnings caused by the
constification patches I missed earlier:

net/ipv4/netfilter/arp_tables.c: In function 'compat_copy_entries_to_user':
net/ipv4/netfilter/arp_tables.c:1569: warning: passing argument 1 of 'alloc_counters' discards qualifiers from pointer target type
net/ipv4/netfilter/arp_tables.c: In function 'compat_get_entries':
net/ipv4/netfilter/arp_tables.c:1628: warning: passing argument 1 of 'xt_table_unlock' discards qualifiers from pointer target type
net/ipv4/netfilter/arp_tables.c: In function 'compat_copy_entries_to_user':
net/ipv4/netfilter/arp_tables.c:1569: warning: passing argument 1 of 'alloc_counters' discards

Again, please test with CONFIG_COMPAT if you touch this code.
I'm leaving for tonight, please send me a patch on top of the
faulty one to fold in for fixing this.

Right...

===
Signed-off-by: Jan Engelhardt <jengelh@xxxxxxxxxxxxxxx>

diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index 6677095..4a305c9 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -737,7 +737,7 @@ static int copy_entries_to_user(unsigned int total_size,
 	unsigned int off, num;
 	struct arpt_entry *e;
 	struct xt_counters *counters;
-	const struct xt_table_info *private = table->private;
+	struct xt_table_info *private = table->private;
 	int ret = 0;
 	void *loc_cpu_entry;

@@ -1555,7 +1555,7 @@ out:
 }

 static int compat_copy_entries_to_user(unsigned int total_size,
-				       const struct xt_table *table,
+				       struct xt_table *table,
 				       void __user *userptr)
 {
 	struct xt_counters *counters;
@@ -1593,7 +1593,7 @@ static int compat_get_entries(struct net *net,
 {
 	int ret;
 	struct compat_arpt_get_entries get;
-	const struct xt_table *t;
+	struct xt_table *t;

 	if (*len < sizeof(get)) {
 		duprintf("compat_get_entries: %u < %zu\n", *len, sizeof(get));
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux