vserver 1.9.3
[linux-2.6.git] / net / ipv4 / xfrm4_output.c
index 191cec7..21832df 100644 (file)
@@ -58,8 +58,7 @@ static void xfrm4_encap(struct sk_buff *skb)
        if (!top_iph->frag_off)
                __ip_select_ident(top_iph, dst, 0);
 
-       /* TTL disclosed */
-       top_iph->ttl = iph->ttl;
+       top_iph->ttl = dst_path_metric(dst, RTAX_HOPLIMIT);
 
        top_iph->saddr = x->props.saddr.a4;
        top_iph->daddr = x->id.daddr.a4;
@@ -119,8 +118,7 @@ int xfrm4_output(struct sk_buff **pskb)
 
        xfrm4_encap(skb);
 
-       err = x->type->output(pskb);
-       skb = *pskb;
+       err = x->type->output(skb);
        if (err)
                goto error;