ChangeSet 1.2229.1.11, 2005/03/18 10:41:41-08:00, [EMAIL PROTECTED]

        [IPSEC]: Get ttl from child instead of path
        
        Now that dst_pmtu is almost gone let's do the same to dst_path_metric.
        I've only found one legitimate use of it and that's the one that was
        recently added in dst_allfrag.
        
        This patch makes xfrm4_encap/xfrm6_encap use dst->child instead of
        dst->path so that we choose the correct route to get the hoplimit
        from when nested tunnels are present.
        
        For simple tunnels dst->child == dst->path so there is no change.
        
        Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
        Signed-off-by: David S. Miller <[EMAIL PROTECTED]>



 ipv4/xfrm4_output.c |    2 +-
 ipv6/xfrm6_output.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


diff -Nru a/net/ipv4/xfrm4_output.c b/net/ipv4/xfrm4_output.c
--- a/net/ipv4/xfrm4_output.c   2005-03-18 14:10:30 -08:00
+++ b/net/ipv4/xfrm4_output.c   2005-03-18 14:10:30 -08:00
@@ -58,7 +58,7 @@
        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;
diff -Nru a/net/ipv6/xfrm6_output.c b/net/ipv6/xfrm6_output.c
--- a/net/ipv6/xfrm6_output.c   2005-03-18 14:10:30 -08:00
+++ b/net/ipv6/xfrm6_output.c   2005-03-18 14:10:30 -08:00
@@ -69,7 +69,7 @@
                dsfield &= ~INET_ECN_MASK;
        ipv6_change_dsfield(top_iph, 0, dsfield);
        top_iph->nexthdr = IPPROTO_IPV6; 
-       top_iph->hop_limit = dst_path_metric(dst, RTAX_HOPLIMIT);
+       top_iph->hop_limit = dst_metric(dst->child, RTAX_HOPLIMIT);
        ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr);
        ipv6_addr_copy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr);
 }
-
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