diff options
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/xfrm6_mode_tunnel.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv6/xfrm6_mode_tunnel.c b/net/ipv6/xfrm6_mode_tunnel.c index 9bf6a74a71d2..4770d515c2c8 100644 --- a/net/ipv6/xfrm6_mode_tunnel.c +++ b/net/ipv6/xfrm6_mode_tunnel.c | |||
@@ -49,8 +49,11 @@ static int xfrm6_mode_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) | |||
49 | sizeof(top_iph->flow_lbl)); | 49 | sizeof(top_iph->flow_lbl)); |
50 | top_iph->nexthdr = xfrm_af2proto(skb_dst(skb)->ops->family); | 50 | top_iph->nexthdr = xfrm_af2proto(skb_dst(skb)->ops->family); |
51 | 51 | ||
52 | dsfield = XFRM_MODE_SKB_CB(skb)->tos; | 52 | if (x->props.extra_flags & XFRM_SA_XFLAG_DONT_ENCAP_DSCP) |
53 | dsfield = INET_ECN_encapsulate(dsfield, dsfield); | 53 | dsfield = 0; |
54 | else | ||
55 | dsfield = XFRM_MODE_SKB_CB(skb)->tos; | ||
56 | dsfield = INET_ECN_encapsulate(dsfield, XFRM_MODE_SKB_CB(skb)->tos); | ||
54 | if (x->props.flags & XFRM_STATE_NOECN) | 57 | if (x->props.flags & XFRM_STATE_NOECN) |
55 | dsfield &= ~INET_ECN_MASK; | 58 | dsfield &= ~INET_ECN_MASK; |
56 | ipv6_change_dsfield(top_iph, 0, dsfield); | 59 | ipv6_change_dsfield(top_iph, 0, dsfield); |