Skip to contentSkip to conversation

IP: disable ECN support by default - Config option

PATCH In review Marc-Christian Petersen 3 participants 4 messages Dec 10, 2002

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

PATCH 1/1 IP: disable ECN support by default - Config option

Hi Marcelo,

attached super trivial patch gives us a config option to choose whether we want ECN disabled per default if selected or not.

consider for inclusion into 2.4.

Has been in WOLK and in Debian kernels for ages.

ciao, Marc

net/ipv4/Config.in +3 -0
@@ -40,6 +40,9 @@
    bool '  IP: ARP daemon support (EXPERIMENTAL)' CONFIG_ARPD
 fi
 bool '  IP: TCP Explicit Congestion Notification support' CONFIG_INET_ECN
+if [ "$CONFIG_INET_ECN" = "y" ]; then
+   bool '    IP: disable ECN support by default' CONFIG_INET_ECN_DISABLED
+fi
 bool '  IP: TCP syncookie support (disabled per default)' CONFIG_SYN_COOKIES
 if [ "$CONFIG_NETFILTER" != "n" ]; then
    source net/ipv4/netfilter/Config.in
net/ipv4/tcp_input.c +1 -1
@@ -74,7 +74,7 @@
 int sysctl_tcp_sack = 1;
 int sysctl_tcp_fack = 1;
 int sysctl_tcp_reordering = TCP_FASTRETRANS_THRESH;
-#ifdef CONFIG_INET_ECN
+#if defined(CONFIG_INET_ECN) && !defined(CONFIG_INET_ECN_DISABLED)
 int sysctl_tcp_ecn = 1;
 #else
 int sysctl_tcp_ecn = 0;
#1 lore raw

CONFIG_INET_ECN does exactly what you want.

If you turn it on, ECN is on by default.
If you turn it off, ECN is off by default.

The ECN support itself, is always compiled into the kernel. CONFIG_INET_ECN only determines the initial setting of the ecn sysctl.

Your patch adds zero functionality and only serves to make the cofiguration more complicated.

#2 lore raw

On Tuesday 10 December 2002 04:28, David S. Miller wrote:

Hi David,

Quoted 4 lines

CONFIG_INET_ECN does exactly what you want.

If you turn it on, ECN is on by default.
If you turn it off, ECN is off by default.

args, you are right. Sorry, my mistake! Maybe I need some sleep, looking twice it is sooo obvious :)

ciao, Marc

#3 lore raw
In reply to Marc-Christian Petersen
Quoted 2 lines · Marc-Christian Petersen

attached super trivial patch gives us a config option to choose whether we want ECN disabled per default if selected or not.

Why do we need that if we can enable/disable ECN at runtime?

Signature · 2 lines
Krzysztof Halasa
Network Administrator