vserver 2.0 rc7
[linux-2.6.git] / net / ipv4 / xfrm4_output.c
index 88fd283..af2392a 100644 (file)
@@ -58,7 +58,7 @@ static void xfrm4_encap(struct sk_buff *skb)
        if (!top_iph->frag_off)
                __ip_select_ident(top_iph, dst, 0);
 
-       top_iph->ttl = dst_path_metric(dst, RTAX_HOPLIMIT);
+       top_iph->ttl = dst_metric(dst->child, RTAX_HOPLIMIT);
 
        top_iph->saddr = x->props.saddr.a4;
        top_iph->daddr = x->id.daddr.a4;
@@ -78,11 +78,11 @@ static int xfrm4_tunnel_check_size(struct sk_buff *skb)
 
        IPCB(skb)->flags |= IPSKB_XFRM_TUNNEL_SIZE;
        
-       if (!(iph->frag_off & htons(IP_DF)))
+       if (!(iph->frag_off & htons(IP_DF)) || skb->local_df)
                goto out;
 
        dst = skb->dst;
-       mtu = dst_pmtu(dst) - dst->header_len - dst->trailer_len;
+       mtu = dst_mtu(dst);
        if (skb->len > mtu) {
                icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu));
                ret = -EMSGSIZE;
@@ -116,7 +116,7 @@ int xfrm4_output(struct sk_buff *skb)
 
        xfrm4_encap(skb);
 
-       err = x->type->output(skb);
+       err = x->type->output(x, skb);
        if (err)
                goto error;