summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorthepeople <thepeople@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-05-08 17:08:06 +0000
committerthepeople <thepeople@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-05-08 17:08:06 +0000
commit318f8f9eeb3d6379d7cb5c709aea47f754da6119 (patch)
tree66a9bbe8429c76152b3e4ed5f65295be959a39a3 /target
parent28e2aaeeb28bc2a308395f4aab511b5ad20a1bbd (diff)
[PATCH] ipv6: restore correct ECN handling on TCP xmit
Thanks Dave Taht git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26858 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/patches-2.6.37/110_fix_ecn_marking_ipv6.patch25
-rw-r--r--target/linux/generic/patches-2.6.38/110_fix_ecn_marking_ipv6.patch25
2 files changed, 50 insertions, 0 deletions
diff --git a/target/linux/generic/patches-2.6.37/110_fix_ecn_marking_ipv6.patch b/target/linux/generic/patches-2.6.37/110_fix_ecn_marking_ipv6.patch
new file mode 100644
index 0000000000..442e5e3c32
--- /dev/null
+++ b/target/linux/generic/patches-2.6.37/110_fix_ecn_marking_ipv6.patch
@@ -0,0 +1,25 @@
+--- a/include/net/inet_ecn.h
++++ b/include/net/inet_ecn.h
+@@ -38,9 +38,19 @@ static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner)
+ return outer;
+ }
+
+-#define INET_ECN_xmit(sk) do { inet_sk(sk)->tos |= INET_ECN_ECT_0; } while (0)
+-#define INET_ECN_dontxmit(sk) \
+- do { inet_sk(sk)->tos &= ~INET_ECN_MASK; } while (0)
++static inline void INET_ECN_xmit(struct sock *sk)
++{
++ inet_sk(sk)->tos |= INET_ECN_ECT_0;
++ if (inet6_sk(sk) != NULL)
++ inet6_sk(sk)->tclass |= INET_ECN_ECT_0;
++}
++
++static inline void INET_ECN_dontxmit(struct sock *sk)
++{
++ inet_sk(sk)->tos &= ~INET_ECN_MASK;
++ if (inet6_sk(sk) != NULL)
++ inet6_sk(sk)->tclass &= ~INET_ECN_MASK;
++}
+
+ #define IP6_ECN_flow_init(label) do { \
+ (label) &= ~htonl(INET_ECN_MASK << 20); \
diff --git a/target/linux/generic/patches-2.6.38/110_fix_ecn_marking_ipv6.patch b/target/linux/generic/patches-2.6.38/110_fix_ecn_marking_ipv6.patch
new file mode 100644
index 0000000000..442e5e3c32
--- /dev/null
+++ b/target/linux/generic/patches-2.6.38/110_fix_ecn_marking_ipv6.patch
@@ -0,0 +1,25 @@
+--- a/include/net/inet_ecn.h
++++ b/include/net/inet_ecn.h
+@@ -38,9 +38,19 @@ static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner)
+ return outer;
+ }
+
+-#define INET_ECN_xmit(sk) do { inet_sk(sk)->tos |= INET_ECN_ECT_0; } while (0)
+-#define INET_ECN_dontxmit(sk) \
+- do { inet_sk(sk)->tos &= ~INET_ECN_MASK; } while (0)
++static inline void INET_ECN_xmit(struct sock *sk)
++{
++ inet_sk(sk)->tos |= INET_ECN_ECT_0;
++ if (inet6_sk(sk) != NULL)
++ inet6_sk(sk)->tclass |= INET_ECN_ECT_0;
++}
++
++static inline void INET_ECN_dontxmit(struct sock *sk)
++{
++ inet_sk(sk)->tos &= ~INET_ECN_MASK;
++ if (inet6_sk(sk) != NULL)
++ inet6_sk(sk)->tclass &= ~INET_ECN_MASK;
++}
+
+ #define IP6_ECN_flow_init(label) do { \
+ (label) &= ~htonl(INET_ECN_MASK << 20); \