mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guillaume Morin <guillaume@morinfr.org>
To: Nicolas Mailhot <Nicolas.Mailhot@LaPoste.net>
Cc: linux-kernel@vger.kernel.org, netfilter@lists.samba.org,
	alan@lxorguk.ukuu.org.uk
Subject: Re: Iptables & ECN
Date: Sun, 11 Nov 2001 23:50:40 +0100	[thread overview]
Message-ID: <20011111235040.A2672@morinfr.org> (raw)
In-Reply-To: <1005518494.5895.0.camel@rousalka.dyndns.org>
In-Reply-To: <1005518494.5895.0.camel@rousalka.dyndns.org>

Dans un message du 11 nov à 23:41, Nicolas Mailhot écrivait :
> 	I'm afraid I've just run in an embarassing iptables « bug » on
> 2.4.13-ac7. When I tell iptables to drop unclean packets with ecn on I
> can no longuer connect to ftp.kernel.org, and get a lot of ipt_unclean:
> TCP reserved bits not zero in the logs. Shouldn't iptables be made
> ecn-aware ?

It is a known bug. Upgrade to 2.4.14+ and apply this patch will fix
fix the problem (and another ipt_unclean glitch)

diff -uNr linux-2.4.14-pre8/net/ipv4/netfilter/ipt_unclean.c linux-tcprb-fixed/net/ipv4/netfilter/ipt_unclean.c
--- linux-2.4.14-pre8/net/ipv4/netfilter/ipt_unclean.c	Wed Oct 31 14:38:23 2001
+++ linux-tcprb-fixed/net/ipv4/netfilter/ipt_unclean.c	Sun Nov  4 08:30:58 2001
@@ -257,6 +257,8 @@
 #define	TH_PUSH	0x08
 #define	TH_ACK	0x10
 #define	TH_URG	0x20
+#define	TH_ECE	0x40
+#define	TH_CWR	0x80
 
 /* TCP-specific checks. */
 static int
@@ -328,9 +330,10 @@
 	}
 
 	/* CHECK: TCP flags. */
-	tcpflags = ((u_int8_t *)tcph)[13];
+	tcpflags = (((u_int8_t *)tcph)[13] & ~(TH_ECE|TH_CWR));
 	if (tcpflags != TH_SYN
 	    && tcpflags != (TH_SYN|TH_ACK)
+		&& tcpflags != TH_RST
 	    && tcpflags != (TH_RST|TH_ACK)
 	    && tcpflags != (TH_RST|TH_ACK|TH_PUSH)
 	    && tcpflags != (TH_FIN|TH_ACK)


I hope the netfilter core team will merge it soon.

Regards,

-- 
Guillaume Morin <guillaume@morinfr.org>

                    Sometimes I find I need to scream (RHCP)

  reply	other threads:[~2001-11-11 22:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-11 22:41 Nicolas Mailhot
2001-11-11 22:50 ` Guillaume Morin [this message]
2001-11-11 22:58 ` Thomas Lussnig
2001-11-11 23:08   ` Guillaume Morin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011111235040.A2672@morinfr.org \
    --to=guillaume@morinfr.org \
    --cc=Nicolas.Mailhot@LaPoste.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netfilter@lists.samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®