442e5e3c321cd557ba1d908c53fc8b61032556aa
[openwrt.git] / target / linux / generic / patches-2.6.38 / 110_fix_ecn_marking_ipv6.patch
1 --- a/include/net/inet_ecn.h
2 +++ b/include/net/inet_ecn.h
3 @@ -38,9 +38,19 @@ static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner)
4 return outer;
5 }
6
7 -#define INET_ECN_xmit(sk) do { inet_sk(sk)->tos |= INET_ECN_ECT_0; } while (0)
8 -#define INET_ECN_dontxmit(sk) \
9 - do { inet_sk(sk)->tos &= ~INET_ECN_MASK; } while (0)
10 +static inline void INET_ECN_xmit(struct sock *sk)
11 +{
12 + inet_sk(sk)->tos |= INET_ECN_ECT_0;
13 + if (inet6_sk(sk) != NULL)
14 + inet6_sk(sk)->tclass |= INET_ECN_ECT_0;
15 +}
16 +
17 +static inline void INET_ECN_dontxmit(struct sock *sk)
18 +{
19 + inet_sk(sk)->tos &= ~INET_ECN_MASK;
20 + if (inet6_sk(sk) != NULL)
21 + inet6_sk(sk)->tclass &= ~INET_ECN_MASK;
22 +}
23
24 #define IP6_ECN_flow_init(label) do { \
25 (label) &= ~htonl(INET_ECN_MASK << 20); \
This page took 0.04116 seconds and 3 git commands to generate.