Skip to content
  • Thomas Egerer's avatar
    xfrm6: Fix IPv6 ECN decapsulation · eae8dee9
    Thomas Egerer authored
    
    
    Using ipv6_get_dsfield on the outer IP header implies that inner and
    outer header are of the the same address family. For interfamily
    tunnels, particularly 646, the code reading the DSCP field obtains the
    wrong values (IHL and the upper four bits of the DSCP field).
    This can cause the code to detect a congestion encoutered state in the
    outer header and enable the corresponding bits in the inner header, too.
    
    Since the DSCP field is stored in the xfrm mode common buffer
    independently from the IP version of the outer header, it's safe (and
    correct) to take this value from there.
    
    Signed-off-by: default avatarThomas Egerer <thomas.egerer@secunet.com>
    Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
    eae8dee9