Skip to contentSkip to conversation

NETFILTER: fix broken debug assertion

PATCH In review Harald Welte 2 participants 2 messages Aug 1, 2004 – Aug 2, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NETFILTER: fix broken debug assertion

Hi Dave!

This patch fixes some more broken netfilter assertions in 2.6.x.

Please apply, thanks.

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/06/23 00:23:13+02:00 [email protected]
# [NETFILTER]: Fix two more broken assertions
#
# Signed-off-by: Patrick McHardy <[email protected]>
# Signed-off-by: Harald Welte <[email protected]>
#
# net/ipv4/netfilter/ipt_MASQUERADE.c
# 2004/06/23 00:23:00+02:00 [email protected] +2 -2
# [NETFILTER]: Fix two more broken assertions
#

# net/ipv4/netfilter/ip_nat_rule.c
#   2004/06/23 00:23:00+02:00 [email protected] +2 -1
#   [NETFILTER]: Fix two more broken assertions
# 
diff -Nru a/net/ipv4/netfilter/ip_nat_rule.c b/net/ipv4/netfilter/ip_nat_rule.c
--- a/net/ipv4/netfilter/ip_nat_rule.c	2004-06-23 00:28:24 +02:00
+++ b/net/ipv4/netfilter/ip_nat_rule.c	2004-06-23 00:28:24 +02:00
@@ -132,7 +132,8 @@
 	ct = ip_conntrack_get(*pskb, &ctinfo);

/* Connection must be valid and new. */

-	IP_NF_ASSERT(ct && (ctinfo == IP_CT_NEW || ctinfo == IP_CT_RELATED));
+	IP_NF_ASSERT(ct && (ctinfo == IP_CT_NEW || ctinfo == IP_CT_RELATED

+ || ctinfo == IP_CT_RELATED + IP_CT_IS_REPLY));
IP_NF_ASSERT(out);

return ip_nat_setup_info(ct, targinfo, hooknum);

net/ipv4/netfilter/ipt_MASQUERADE.c +2 -2
diff -Nru a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c
@@ -91,8 +91,8 @@
 		return NF_ACCEPT;
 
 	ct = ip_conntrack_get(*pskb, &ctinfo);
-	IP_NF_ASSERT(ct && (ctinfo == IP_CT_NEW
-				  || ctinfo == IP_CT_RELATED));
+	IP_NF_ASSERT(ct && (ctinfo == IP_CT_NEW || ctinfo == IP_CT_RELATED
+	                    || ctinfo == IP_CT_RELATED + IP_CT_IS_REPLY));
 
 	mr = targinfo;
 
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
#1 lore raw
Quoted 1 line · On Mon, 2 Aug 2004 01:17:44 +0200 Harald Welte <[email protected]> wrote:

This patch fixes some more broken netfilter assertions in 2.6.x.

Added to the 2.6.9 queue