* [PATCH] [NET] Fix ECN Encapsulation
@ 2004-10-06 2:34 YOSHIFUJI Hideaki / 吉藤英明
2004-10-06 5:20 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-10-06 2:34 UTC (permalink / raw)
To: davem; +Cc: yoshfuji, netdev, usagi-core
Hello.
Please pull the following changeset from
<bk://bk.skbuff.net:20609/linux-2.6-tunnel/>.
Thank you.
HEADLINE
--------
ChangeSet@1.2051, 2004-10-06 11:28:16+09:00, yoshfuji@linux-ipv6.org
[NET] ECN: Fix bug in tunnel ECN handling by recent changes.
DIFFSTAT
--------
include/net/inet_ecn.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
CHANGESET
---------
ChangeSet@1.2051, 2004-10-06 11:28:16+09:00, yoshfuji@linux-ipv6.org
[NET] ECN: Fix bug in tunnel ECN handling by recent changes.
We broke ECN encapsulation in tunnels recently.
Without this patch, even though encapusulated (inner) packet is
"not-ECN", encapusulating (outer) packet is sent with "ECT(0)" set.
This is wrong and should be "not-ECN."
This patch fixes up.
From RFC3168:
The full-functionality option for ECN encapsulation is to copy the
ECN codepoint of the inside header to the outside header on
encapsulation if the inside header is not-ECT or ECT, and to set the
ECN codepoint of the outside header to ECT(0) if the ECN codepoint of
the inside header is CE.
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
diff -Nru a/include/net/inet_ecn.h b/include/net/inet_ecn.h
--- a/include/net/inet_ecn.h 2004-10-06 11:30:10 +09:00
+++ b/include/net/inet_ecn.h 2004-10-06 11:30:10 +09:00
@@ -30,7 +30,8 @@
static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner)
{
outer &= ~INET_ECN_MASK;
- outer |= (inner & INET_ECN_MASK) ?: INET_ECN_ECT_0;
+ outer |= !INET_ECN_is_ce(inner) ? (inner & INET_ECN_MASK) :
+ INET_ECN_ECT_0;
return outer;
}
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] [NET] Fix ECN Encapsulation
2004-10-06 2:34 [PATCH] [NET] Fix ECN Encapsulation YOSHIFUJI Hideaki / 吉藤英明
@ 2004-10-06 5:20 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-10-06 5:20 UTC (permalink / raw)
To: yoshfuji; +Cc: netdev, usagi-core
On Wed, 06 Oct 2004 11:34:04 +0900 (JST)
YOSHIFUJI Hideaki / ^[$B5HF#1QL@^[(B <yoshfuji@linux-ipv6.org> wrote:
> HEADLINE
> --------
> ChangeSet@1.2051, 2004-10-06 11:28:16+09:00, yoshfuji@linux-ipv6.org
> [NET] ECN: Fix bug in tunnel ECN handling by recent changes.
Patch applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-06 5:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-06 2:34 [PATCH] [NET] Fix ECN Encapsulation YOSHIFUJI Hideaki / 吉藤英明
2004-10-06 5:20 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).