: Fix non-existant config option CONFIG_NF_DEBUG
Subsystems (2)
PATCH 1/14 : Fix non-existant config option CONFIG_NF_DEBUG
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 <[email protected]>
# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/06/20 22:25:24+02:00 [email protected]
# [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 [email protected] +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 [email protected] +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 [email protected] +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)) \
net/ipv4/netfilter/ip_conntrack_core.c +1 -3
@@ -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;
net/ipv4/netfilter/ip_nat_core.c +3 -2
@@ -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
Quoted 5 lines · On Mon, 21 Jun 2004 21:38:51 +0200 Harald Welte <[email protected]> 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.
Quoted 3 lines · David S. Miller
Quoted 1 line
Please apply to your tree, thanks.
All 2.6.x patches applied, thanks.
great, thanks for the quick response.
Quoted 2 lines
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.
Quoted 2 lines
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 ;)
Signature · 5 lines
- Harald Welte <[email protected]> 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
Quoted 6 lines · On Tue, 22 Jun 2004 00:44:56 +0200 Harald Welte <[email protected]> wrote:
Quoted 2 lines
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.
Quoted 7 lines · David S. Miller
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
Quoted 2 lines · On Tue, 22 Jun 2004 01:20:01 +0200 Patrick McHardy <[email protected]> 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.