ChangeSet 1.2229.1.10, 2005/03/18 10:39:12-08:00, [EMAIL PROTECTED]

        [IPV4]: Kill remaining unnecessary uses of dst_pmtu
        
        Once again here is a couple of trivial dst_pmtu/dst_mtu replacements.
        In both locations, we can only have simple dst entries which means
        that dst == dst->path.
        
        BTW, this is the rule that we should apply in future for uses of
        dst_mtu/dst_pmtu (or other metrics on dst).  If the only dst's that
        can appear are simple dst's (dst == dst->path), then we should use
        dst_mtu or dst_metric.  If dst != dst->path, then whoever is writing
        the code will need to think about which of dst or dst->path is the
        right one.
        
        In most instances dst will be the one.  However, as we have seen in
        ip_append_data, dst->path may be needed rarely.  In particular, if
        we're doing fragmentation immediately after IPsec, then you may need
        it.
        
        Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
        Signed-off-by: David S. Miller <[EMAIL PROTECTED]>



 ipvs/ip_vs_xmit.c                   |   10 +++++-----
 netfilter/ip_conntrack_standalone.c |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)


diff -Nru a/net/ipv4/ipvs/ip_vs_xmit.c b/net/ipv4/ipvs/ip_vs_xmit.c
--- a/net/ipv4/ipvs/ip_vs_xmit.c        2005-03-18 14:10:17 -08:00
+++ b/net/ipv4/ipvs/ip_vs_xmit.c        2005-03-18 14:10:17 -08:00
@@ -178,7 +178,7 @@
        }
 
        /* 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));
@@ -245,7 +245,7 @@
                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));
@@ -342,7 +342,7 @@
 
        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");
@@ -445,7 +445,7 @@
                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);
@@ -520,7 +520,7 @@
                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));
diff -Nru a/net/ipv4/netfilter/ip_conntrack_standalone.c 
b/net/ipv4/netfilter/ip_conntrack_standalone.c
--- a/net/ipv4/netfilter/ip_conntrack_standalone.c      2005-03-18 14:10:17 
-08:00
+++ b/net/ipv4/netfilter/ip_conntrack_standalone.c      2005-03-18 14:10:17 
-08:00
@@ -457,7 +457,7 @@
        /* Local packets are never produced too large for their
           interface.  We degfragment them at LOCAL_OUT, however,
           so we have to refragment them here. */
-       if ((*pskb)->len > dst_pmtu(&rt->u.dst) &&
+       if ((*pskb)->len > dst_mtu(&rt->u.dst) &&
            !skb_shinfo(*pskb)->tso_size) {
                /* No hook can be after us, so this should be OK. */
                ip_fragment(*pskb, okfn);
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to