vserver 1.9.3
[linux-2.6.git] / net / ipv4 / xfrm4_input.c
index b045c87..47e54d4 100644 (file)
@@ -24,8 +24,7 @@ static inline void ipip_ecn_decapsulate(struct sk_buff *skb)
        struct iphdr *outer_iph = skb->nh.iph;
        struct iphdr *inner_iph = skb->h.ipiph;
 
-       if (INET_ECN_is_ce(outer_iph->tos) &&
-           INET_ECN_is_not_ce(inner_iph->tos))
+       if (INET_ECN_is_ce(outer_iph->tos))
                IP_ECN_set_ce(inner_iph);
 }
 
@@ -102,6 +101,8 @@ int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type)
                        if (skb_cloned(skb) &&
                            pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
                                goto drop;
+                       if (x->props.flags & XFRM_STATE_DECAP_DSCP)
+                               ipv4_copy_dscp(iph, skb->h.ipiph);
                        if (!(x->props.flags & XFRM_STATE_NOECN))
                                ipip_ecn_decapsulate(skb);
                        skb->mac.raw = memmove(skb->data - skb->mac_len,