mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-26 13:33:21 +02:00
8f5d6564e0
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26955 3c298f89-4303-0410-b956-a3cf2f4a3e73
26 lines
738 B
Diff
26 lines
738 B
Diff
--- a/include/net/inet_ecn.h
|
|
+++ b/include/net/inet_ecn.h
|
|
@@ -38,9 +38,19 @@ static inline __u8 INET_ECN_encapsulate(
|
|
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); \
|