vserver 2.0 rc7
[linux-2.6.git] / net / ipv4 / ipvs / ip_vs_xmit.c
index 58db69d..de21da0 100644 (file)
@@ -52,6 +52,7 @@ __ip_vs_dst_check(struct ip_vs_dest *dest, u32 rtos, u32 cookie)
        if ((dst->obsolete || rtos != dest->dst_rtos) &&
            dst->ops->check(dst, cookie) == NULL) {
                dest->dst_cache = NULL;
+               dst_release(dst);
                return NULL;
        }
        dst_hold(dst);
@@ -177,7 +178,7 @@ ip_vs_bypass_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
        }
 
        /* MTU checking */
-       mtu = dst_pmtu(&rt->u.dst);
+       mtu = dst_mtu(&rt->u.dst);
        if ((skb->len > mtu) && (iph->frag_off&__constant_htons(IP_DF))) {
                ip_rt_put(rt);
                icmp_send(skb, ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED, htonl(mtu));
@@ -244,7 +245,7 @@ ip_vs_nat_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
                goto tx_error_icmp;
 
        /* MTU checking */
-       mtu = dst_pmtu(&rt->u.dst);
+       mtu = dst_mtu(&rt->u.dst);
        if ((skb->len > mtu) && (iph->frag_off&__constant_htons(IP_DF))) {
                ip_rt_put(rt);
                icmp_send(skb, ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED, htonl(mtu));
@@ -341,7 +342,7 @@ ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
 
        tdev = rt->u.dst.dev;
 
-       mtu = dst_pmtu(&rt->u.dst) - sizeof(struct iphdr);
+       mtu = dst_mtu(&rt->u.dst) - sizeof(struct iphdr);
        if (mtu < 68) {
                ip_rt_put(rt);
                IP_VS_DBG_RL("ip_vs_tunnel_xmit(): mtu less than 68\n");
@@ -444,7 +445,7 @@ ip_vs_dr_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
                goto tx_error_icmp;
 
        /* MTU checking */
-       mtu = dst_pmtu(&rt->u.dst);
+       mtu = dst_mtu(&rt->u.dst);
        if ((iph->frag_off&__constant_htons(IP_DF)) && skb->len > mtu) {
                icmp_send(skb, ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED, htonl(mtu));
                ip_rt_put(rt);
@@ -507,7 +508,6 @@ ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
                        rc = NF_ACCEPT;
                /* do not touch skb anymore */
                atomic_inc(&cp->in_pkts);
-               __ip_vs_conn_put(cp);
                goto out;
        }
 
@@ -519,7 +519,7 @@ ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
                goto tx_error_icmp;
 
        /* MTU checking */
-       mtu = dst_pmtu(&rt->u.dst);
+       mtu = dst_mtu(&rt->u.dst);
        if ((skb->len > mtu) && (skb->nh.iph->frag_off&__constant_htons(IP_DF))) {
                ip_rt_put(rt);
                icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu));