[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49D8A6BB.5000700@cosmosbay.com>
Date: Sun, 05 Apr 2009 14:40:27 +0200
From: Eric Dumazet <dada1@...mosbay.com>
To: Graham Murray <graham@...rray.org.uk>,
"David S. Miller" <davem@...emloft.net>
CC: linux-kernel@...r.kernel.org,
Linux Netdev List <netdev@...r.kernel.org>
Subject: Re: [PATCH] netfilter: ip6tables fix
Eric Dumazet a écrit :
> Eric Dumazet a écrit :
>> Graham Murray a écrit :
>>> iptables gives me no problems at all, it is just ip6tables that
>>> fails. The first indication of this is during the init scripts when
>>> ip6tables-restore fails.
>> I see, its a plain bug in net/ipv6/netfilter/ip6_tables.c
>> function alloc_counters() always returns -ENOMEM
>>
>> Unfortunatly , its Sunday here and I have to run for lunch time with family :)
>>
>> If nobody beats me, I will do the fix in a couple of hours...
>
> Here is the fix, thanks Graham for the report !
>
> [PATCH] netfilter: ip6tables fix
>
> ip6_tables.c alloc_counters() misses a return statement, making
> ip6tables -N always failing and leaking memory.
Oh well, this ChangeLog is not correct :(
Here is an updated patch with correct ChangeLog, sorry David.
(-L instead of -N, and there was no memory leak involved)
[PATCH] netfilter: ip6tables fix
ip6_tables.c alloc_counters() misses a return statement, making
ip6tables -L always failing.
Reported-by: Graham Murray <graham@...rray.org.uk>
Signed-off-by: Eric Dumazet <dada1@...mosbay.com>
---
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index dfed176..800ae85 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -1033,6 +1033,8 @@ static struct xt_counters *alloc_counters(struct xt_table *table)
xt_free_table_info(info);
+ return counters;
+
free_counters:
vfree(counters);
nomem:
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists