* [PATCH 2.6 1/14]: Fix non-existant config option CONFIG_NF_DEBUG
@ 2004-06-21 19:38 Harald Welte
2004-06-21 21:44 ` David S. Miller
0 siblings, 1 reply; 6+ messages in thread
From: Harald Welte @ 2004-06-21 19:38 UTC (permalink / raw)
To: David Miller; +Cc: Netfilter Development Mailinglist
[-- Attachment #1.1: Type: text/plain, Size: 492 bytes --]
Hi Dave!
Sorry for the patch-bombing, but we have finally decided that now is the
right time to submit some long-standing fixes and additions to netfilter
in the 2.6.x series.
Please apply to your tree, thanks.
This patch for 2.6 fixes a non-existant config option (CONFIG_NF_DEBUG)
for IP_NF_ASSERT and fixes a couple of broken assertions.
Author: Patrick McHardy <kaber@trash.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Harald Welte <laforge@netfilter.org>
[-- Attachment #1.2: 01.diff --]
[-- Type: text/plain, Size: 3288 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/06/20 22:25:24+02:00 kaber@trash.net
# [NETFILTER]: Fix non-existant config option for IP_NF_ASSERT, fix some broken assertions
#
# net/ipv4/netfilter/ip_nat_core.c
# 2004/06/20 22:25:13+02:00 kaber@trash.net +3 -2
# [NETFILTER]: Fix non-existant config option for IP_NF_ASSERT, fix some broken assertions
#
# net/ipv4/netfilter/ip_conntrack_core.c
# 2004/06/20 22:25:13+02:00 kaber@trash.net +1 -3
# [NETFILTER]: Fix non-existant config option for IP_NF_ASSERT, fix some broken assertions
#
# include/linux/netfilter_ipv4/ip_conntrack.h
# 2004/06/20 22:25:13+02:00 kaber@trash.net +1 -1
# [NETFILTER]: Fix non-existant config option for IP_NF_ASSERT, fix some broken assertions
#
diff -Nru a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h
--- a/include/linux/netfilter_ipv4/ip_conntrack.h 2004-06-20 22:59:21 +02:00
+++ b/include/linux/netfilter_ipv4/ip_conntrack.h 2004-06-20 22:59:21 +02:00
@@ -103,7 +103,7 @@
#include <linux/types.h>
#include <linux/skbuff.h>
-#ifdef CONFIG_NF_DEBUG
+#ifdef CONFIG_NETFILTER_DEBUG
#define IP_NF_ASSERT(x) \
do { \
if (!(x)) \
diff -Nru a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
--- a/net/ipv4/netfilter/ip_conntrack_core.c 2004-06-20 22:59:21 +02:00
+++ b/net/ipv4/netfilter/ip_conntrack_core.c 2004-06-20 22:59:21 +02:00
@@ -173,13 +173,12 @@
destroy_expect(struct ip_conntrack_expect *exp)
{
DEBUGP("destroy_expect(%p) use=%d\n", exp, atomic_read(&exp->use));
- IP_NF_ASSERT(atomic_read(&exp->use));
+ IP_NF_ASSERT(atomic_read(&exp->use) == 0);
IP_NF_ASSERT(!timer_pending(&exp->timeout));
kfree(exp);
}
-
inline void ip_conntrack_expect_put(struct ip_conntrack_expect *exp)
{
IP_NF_ASSERT(exp);
@@ -715,7 +714,6 @@
DEBUGP("conntrack: expectation arrives ct=%p exp=%p\n",
conntrack, expected);
/* Welcome, Mr. Bond. We've been expecting you... */
- IP_NF_ASSERT(master_ct(conntrack));
__set_bit(IPS_EXPECTED_BIT, &conntrack->status);
conntrack->master = expected;
expected->sibling = conntrack;
diff -Nru a/net/ipv4/netfilter/ip_nat_core.c b/net/ipv4/netfilter/ip_nat_core.c
--- a/net/ipv4/netfilter/ip_nat_core.c 2004-06-20 22:59:21 +02:00
+++ b/net/ipv4/netfilter/ip_nat_core.c 2004-06-20 22:59:21 +02:00
@@ -528,6 +528,7 @@
MUST_BE_WRITE_LOCKED(&ip_nat_lock);
IP_NF_ASSERT(hooknum == NF_IP_PRE_ROUTING
|| hooknum == NF_IP_POST_ROUTING
+ || hooknum == NF_IP_LOCAL_IN
|| hooknum == NF_IP_LOCAL_OUT);
IP_NF_ASSERT(info->num_manips < IP_NAT_MAX_MANIPS);
IP_NF_ASSERT(!(info->initialized & (1 << HOOK2MANIP(hooknum))));
@@ -899,10 +900,10 @@
/* Must be RELATED */
IP_NF_ASSERT((*pskb)->nfct
- - (struct ip_conntrack *)(*pskb)->nfct->master
+ - ((struct ip_conntrack *)(*pskb)->nfct->master)->infos
== IP_CT_RELATED
|| (*pskb)->nfct
- - (struct ip_conntrack *)(*pskb)->nfct->master
+ - ((struct ip_conntrack *)(*pskb)->nfct->master)->infos
== IP_CT_RELATED+IP_CT_IS_REPLY);
/* Redirects on non-null nats must be dropped, else they'll
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6 1/14]: Fix non-existant config option CONFIG_NF_DEBUG
2004-06-21 19:38 [PATCH 2.6 1/14]: Fix non-existant config option CONFIG_NF_DEBUG Harald Welte
@ 2004-06-21 21:44 ` David S. Miller
2004-06-21 22:44 ` Harald Welte
0 siblings, 1 reply; 6+ messages in thread
From: David S. Miller @ 2004-06-21 21:44 UTC (permalink / raw)
To: Harald Welte; +Cc: netfilter-devel
On Mon, 21 Jun 2004 21:38:51 +0200
Harald Welte <laforge@netfilter.org> wrote:
> Sorry for the patch-bombing, but we have finally decided that now is the
> right time to submit some long-standing fixes and additions to netfilter
> in the 2.6.x series.
>
> Please apply to your tree, thanks.
All 2.6.x patches applied, thanks.
Harald, you are using bitkeeper, maybe I can directly pull from
your tree at some point? Also, please add the necessary
Signed-off-by: lines to your changeset comments. That would
help me a lot.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6 1/14]: Fix non-existant config option CONFIG_NF_DEBUG
2004-06-21 21:44 ` David S. Miller
@ 2004-06-21 22:44 ` Harald Welte
2004-06-21 23:01 ` David S. Miller
0 siblings, 1 reply; 6+ messages in thread
From: Harald Welte @ 2004-06-21 22:44 UTC (permalink / raw)
To: David S. Miller; +Cc: kaber, Netfilter Development Mailinglist
[-- Attachment #1: Type: text/plain, Size: 1111 bytes --]
On Mon, Jun 21, 2004 at 02:44:52PM -0700, David S. Miller wrote:
> > Please apply to your tree, thanks.
>
> All 2.6.x patches applied, thanks.
great, thanks for the quick response.
> Harald, you are using bitkeeper, maybe I can directly pull from
> your tree at some point?
No, for "religious" reasons, I myself am not using bitkeeper, sorry.
This whole patchset was provided and tested by Patrick McHardy, who
apparently uses bitkeeper.
> Also, please add the necessary Signed-off-by: lines to your changeset
> comments. That would help me a lot.
Patrick is certainly happy to do so. However, it is not granted nor
likely that all of the future patches of the netfilter project will be
prepared by him ;)
--
- Harald Welte <laforge@netfilter.org> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6 1/14]: Fix non-existant config option CONFIG_NF_DEBUG
2004-06-21 22:44 ` Harald Welte
@ 2004-06-21 23:01 ` David S. Miller
2004-06-21 23:20 ` Patrick McHardy
0 siblings, 1 reply; 6+ messages in thread
From: David S. Miller @ 2004-06-21 23:01 UTC (permalink / raw)
To: Harald Welte; +Cc: kaber, netfilter-devel
On Tue, 22 Jun 2004 00:44:56 +0200
Harald Welte <laforge@netfilter.org> wrote:
> > Also, please add the necessary Signed-off-by: lines to your changeset
> > comments. That would help me a lot.
>
> Patrick is certainly happy to do so. However, it is not granted nor
> likely that all of the future patches of the netfilter project will be
> prepared by him ;)
The person who codes the patch (in this case Patrick), the person
who first integrates it (you) and me all have to sign off on the
patch.
I don't care if you use bitkeeper or not, but you have to give me
the Signed-off-by: lines in your email descriptions or someplace
similar.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6 1/14]: Fix non-existant config option CONFIG_NF_DEBUG
2004-06-21 23:01 ` David S. Miller
@ 2004-06-21 23:20 ` Patrick McHardy
2004-06-21 23:27 ` David S. Miller
0 siblings, 1 reply; 6+ messages in thread
From: Patrick McHardy @ 2004-06-21 23:20 UTC (permalink / raw)
To: David S. Miller; +Cc: Harald Welte, netfilter-devel
David S. Miller wrote:
> The person who codes the patch (in this case Patrick), the person
> who first integrates it (you) and me all have to sign off on the
> patch.
>
> I don't care if you use bitkeeper or not, but you have to give me
> the Signed-off-by: lines in your email descriptions or someplace
> similar.
In this case Harald just passed the patchset on, so all mistakes are
mine. The 2.4 patches didn't include any Signed-off-by: lines because
I was under the impression that Marcelo doesn't require them. All 2.6
patches had them at the end of the patch description, but I'll be happy
to include them directly in the changeset comments next time I prepare
a patchset.
Regards
Patrick
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6 1/14]: Fix non-existant config option CONFIG_NF_DEBUG
2004-06-21 23:20 ` Patrick McHardy
@ 2004-06-21 23:27 ` David S. Miller
0 siblings, 0 replies; 6+ messages in thread
From: David S. Miller @ 2004-06-21 23:27 UTC (permalink / raw)
To: Patrick McHardy; +Cc: laforge, netfilter-devel
On Tue, 22 Jun 2004 01:20:01 +0200
Patrick McHardy <kaber@trash.net> wrote:
> The 2.4 patches didn't include any Signed-off-by: lines because
> I was under the impression that Marcelo doesn't require them.
He doesn't, but I do them anyways.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-06-21 23:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-21 19:38 [PATCH 2.6 1/14]: Fix non-existant config option CONFIG_NF_DEBUG Harald Welte
2004-06-21 21:44 ` David S. Miller
2004-06-21 22:44 ` Harald Welte
2004-06-21 23:01 ` David S. Miller
2004-06-21 23:20 ` Patrick McHardy
2004-06-21 23:27 ` David S. Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.