From: Andrea Rossato <mailing_list@istitutocolli.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] ECN and ipitables: a political issue
Date: Sat, 14 Dec 2002 10:52:57 +0000 [thread overview]
Message-ID: <marc-lartc-103986328831220@msgid-missing> (raw)
In-Reply-To: <marc-lartc-103920005828158@msgid-missing>
[-- Attachment #1: Type: text/plain, Size: 807 bytes --]
Andrea Rossato wrote:
> Being able to discriminate between good and bad guys it is possible
> through a filtering rule,
>
> iptables -A POSTROUTING -t mangle -p tcp -d bad.guy.com -j ECN
> --ecn-tcp-remove.
> Now, the problem is the rule seems not to be working and I cannot
> connect to those hosts unless turning ecn off (echo 0 >
> /proc/sys/net/ipv4/tcp_ecn), the wrong solution. I suspect I'm getting
> something wrong.
(just for documentation)
i was not getting anything wrong: there was a bug in checksum
recalculation after application of the ECN target.
Patrick McHardy promprly posted a patch in netfilter-devel mailing list.
(the patch is attached to the present message)
Now the rule is working just fine!!
(should I submit a patch proposal to LARTC to document the issue?)
andrea
[-- Attachment #2: ipt_ECN.diff.1 --]
[-- Type: text/plain, Size: 499 bytes --]
--- net/ipv4/netfilter/ipt_ECN.c.orig 2002-12-09 23:14:20.000000000 +0100
+++ net/ipv4/netfilter/ipt_ECN.c 2002-12-09 23:13:27.000000000 +0100
@@ -88,8 +88,8 @@
}
if (diffs[0] != *tcpflags) {
- diffs[0] = htons(diffs[0]) ^ 0xFFFF;
- diffs[1] = htons(*tcpflags);
+ diffs[0] = diffs[0] ^ 0xFFFF;
+ diffs[1] = *tcpflags;
tcph->check = csum_fold(csum_partial((char *)diffs,
sizeof(diffs),
tcph->check^0xFFFF));
prev parent reply other threads:[~2002-12-14 10:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-06 18:38 [LARTC] ECN and ipitables: a political issue Andrea Rossato
2002-12-14 10:52 ` Andrea Rossato [this message]
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=marc-lartc-103986328831220@msgid-missing \
--to=mailing_list@istitutocolli.org \
--cc=lartc@vger.kernel.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 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.