Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
[linux-2.6-microblaze.git] / net / netfilter / ipvs / ip_vs_xmit.c
index 8f7fff7..473cce2 100644 (file)
@@ -266,12 +266,13 @@ static inline bool decrement_ttl(struct netns_ipvs *ipvs,
 
                /* check and decrement ttl */
                if (ipv6_hdr(skb)->hop_limit <= 1) {
+                       struct inet6_dev *idev = __in6_dev_get_safely(skb->dev);
+
                        /* Force OUTPUT device used as source address */
                        skb->dev = dst->dev;
                        icmpv6_send(skb, ICMPV6_TIME_EXCEED,
                                    ICMPV6_EXC_HOPLIMIT, 0);
-                       __IP6_INC_STATS(net, ip6_dst_idev(dst),
-                                       IPSTATS_MIB_INHDRERRORS);
+                       __IP6_INC_STATS(net, idev, IPSTATS_MIB_INHDRERRORS);
 
                        return false;
                }