source: trunk/target/linux/generic/patches-2.6.37/110_fix_ecn_marking_ipv6.patch @ 26858

Last change on this file since 26858 was 26858, checked in by thepeople, 6 years ago

[PATCH] ipv6: restore correct ECN handling on TCP xmit
Thanks Dave Taht

File size: 761 bytes
  • include/net/inet_ecn.h

    a b static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner) 
    3838        return outer; 
    3939} 
    4040 
    41 #define INET_ECN_xmit(sk) do { inet_sk(sk)->tos |= INET_ECN_ECT_0; } while (0) 
    42 #define INET_ECN_dontxmit(sk) \ 
    43         do { inet_sk(sk)->tos &= ~INET_ECN_MASK; } while (0) 
     41static inline void INET_ECN_xmit(struct sock *sk) 
     42{ 
     43        inet_sk(sk)->tos |= INET_ECN_ECT_0; 
     44        if (inet6_sk(sk) != NULL) 
     45                inet6_sk(sk)->tclass |= INET_ECN_ECT_0; 
     46} 
     47 
     48static inline void INET_ECN_dontxmit(struct sock *sk) 
     49{ 
     50        inet_sk(sk)->tos &= ~INET_ECN_MASK; 
     51        if (inet6_sk(sk) != NULL) 
     52                inet6_sk(sk)->tclass &= ~INET_ECN_MASK; 
     53} 
    4454 
    4555#define IP6_ECN_flow_init(label) do {           \ 
    4656      (label) &= ~htonl(INET_ECN_MASK << 20);   \ 
Note: See TracBrowser for help on using the repository browser.