[lkml]   [2001]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] TCP ECN bits and TCP_RESERVED_BITS macro
Hi folks,

As most people here know, RFC3168 adds two new bits to the TCP header
(ECE and CWR). Those were reserved in RFC793 (standard for TCP).

Since RFC3168 is an proposed standard and ECN is now used widely on
Linux systems, I'd like to suggest the modification of the
TCP_RESERVED_BITS. This change seems logical wrt

include/linux/tcp.h the tcphdr struct :
__u16 doff:4,

This change is pretty harmless, since, this macro is used in

1) include/net/tcp_ecn.h. I've patched the related part even if it would
have work without. It is just cleaner.

2) netfilter:
- in the LOG target, it won't break them. I'll submit patches
to netfilter-devel to display TCP ECN bits just like any other TCP flags
(which will ease the LOG readings)
- In the unclean target where the current value breaks the module.

Patch against 2.4.14-pre6

diff -uNr linux/include/linux/tcp.h linux-new-tcprb/include/linux/tcp.h
--- linux/include/linux/tcp.h Sat Apr 28 00:48:20 2001
+++ linux-new-tcprb/include/linux/tcp.h Wed Oct 31 14:51:40 2001
@@ -110,7 +110,7 @@
TCP_FLAG_RST = __constant_htonl(0x00040000),
TCP_FLAG_SYN = __constant_htonl(0x00020000),
TCP_FLAG_FIN = __constant_htonl(0x00010000),
- TCP_RESERVED_BITS = __constant_htonl(0x0FC00000),
+ TCP_RESERVED_BITS = __constant_htonl(0x0F000000),
TCP_DATA_OFFSET = __constant_htonl(0xF0000000)

diff -uNr linux/include/net/tcp_ecn.h linux-new-tcprb/include/net/tcp_ecn.h
--- linux/include/net/tcp_ecn.h Wed Oct 31 14:57:53 2001
+++ linux-new-tcprb/include/net/tcp_ecn.h Wed Oct 31 14:50:46 2001
@@ -3,7 +3,7 @@

#include <net/inet_ecn.h>


#define TCP_ECN_OK 1

All comments welcome.

Guillaume Morin <>

Do you worry that you're not liked ? How long till you break
(Our Lady Peace)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:12    [W:0.057 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site