aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index e2c980dbe52d..452111fa4c52 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -216,9 +216,12 @@ static void ip6_dst_ifdown(struct dst_entry *dst, struct net_device *dev,
216{ 216{
217 struct rt6_info *rt = (struct rt6_info *)dst; 217 struct rt6_info *rt = (struct rt6_info *)dst;
218 struct inet6_dev *idev = rt->rt6i_idev; 218 struct inet6_dev *idev = rt->rt6i_idev;
219 struct net_device *loopback_dev =
220 dev->nd_net->loopback_dev;
219 221
220 if (dev != init_net.loopback_dev && idev != NULL && idev->dev == dev) { 222 if (dev != loopback_dev && idev != NULL && idev->dev == dev) {
221 struct inet6_dev *loopback_idev = in6_dev_get(init_net.loopback_dev); 223 struct inet6_dev *loopback_idev =
224 in6_dev_get(loopback_dev);
222 if (loopback_idev != NULL) { 225 if (loopback_idev != NULL) {
223 rt->rt6i_idev = loopback_idev; 226 rt->rt6i_idev = loopback_idev;
224 in6_dev_put(idev); 227 in6_dev_put(idev);