Skip to contentSkip to conversation

trivial but important iptables ipt_conntrack fix

PATCH In review Harald Welte 2 participants 2 messages May 3, 2003

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

PATCH 1/1 trivial but important iptables ipt_conntrack fix

Hi Marcelo & Dave!

I'm sending you this fairly trivial fix for ipt_conntrack, that should definitely go in before 2.4.21 is released.

Please apply, Thanks!

net/ipv4/netfilter/ipt_conntrack.c +5 -1
@@ -27,7 +27,11 @@
 
 #define FWINV(bool,invflg) ((bool) ^ !!(sinfo->invflags & invflg))
 
-	statebit = ct ? IPT_CONNTRACK_STATE_INVALID : IPT_CONNTRACK_STATE_BIT(ctinfo);
+	if (ct)
+		statebit = IPT_CONNTRACK_STATE_BIT(ctinfo);
+	else
+		statebit = IPT_CONNTRACK_STATE_INVALID;
+
 	if(sinfo->flags & IPT_CONNTRACK_STATE) {
 		if (ct) {
 			if(ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.ip !=
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

From: Harald Welte <[email protected]>
Date: Sat, 3 May 2003 14:03:50 +0200

I'm sending you this fairly trivial fix for ipt_conntrack, that should definitely go in before 2.4.21 is released.

Marcelo, I also have a set of remote networking exploit fixes for you.

So I'll add this change from Harald to my tree and send you all the fixes together in the next day or two.

Thanks.