diff options
Diffstat (limited to 'net/ipv4/xfrm4_mode_tunnel.c')
-rw-r--r-- | net/ipv4/xfrm4_mode_tunnel.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv4/xfrm4_mode_tunnel.c b/net/ipv4/xfrm4_mode_tunnel.c index fe5189e2e114..eb1dd4d643f2 100644 --- a/net/ipv4/xfrm4_mode_tunnel.c +++ b/net/ipv4/xfrm4_mode_tunnel.c | |||
@@ -103,8 +103,12 @@ static int xfrm4_mode_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) | |||
103 | 103 | ||
104 | top_iph->protocol = xfrm_af2proto(skb_dst(skb)->ops->family); | 104 | top_iph->protocol = xfrm_af2proto(skb_dst(skb)->ops->family); |
105 | 105 | ||
106 | /* DS disclosed */ | 106 | /* DS disclosing depends on XFRM_SA_XFLAG_DONT_ENCAP_DSCP */ |
107 | top_iph->tos = INET_ECN_encapsulate(XFRM_MODE_SKB_CB(skb)->tos, | 107 | if (x->props.extra_flags & XFRM_SA_XFLAG_DONT_ENCAP_DSCP) |
108 | top_iph->tos = 0; | ||
109 | else | ||
110 | top_iph->tos = XFRM_MODE_SKB_CB(skb)->tos; | ||
111 | top_iph->tos = INET_ECN_encapsulate(top_iph->tos, | ||
108 | XFRM_MODE_SKB_CB(skb)->tos); | 112 | XFRM_MODE_SKB_CB(skb)->tos); |
109 | 113 | ||
110 | flags = x->props.flags; | 114 | flags = x->props.flags; |