diff options
author | Gao feng <gaofeng@cn.fujitsu.com> | 2013-06-02 18:16:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-04 19:57:41 -0400 |
commit | 534c877928a16ae5f9776436a497109639bf67dc (patch) | |
tree | 7558dd85f59c33145a0ac52596dd103392a53af4 /net/ipv6 | |
parent | 23eb45fce933ec09601a1c3f6e1c56190c9af301 (diff) |
ipv6: assign rt6_info to inet6_ifaddr in init_loopback
Commit 25fb6ca4ed9cad72f14f61629b68dc03c0d9713f
"net IPv6 : Fix broken IPv6 routing table after loopback down-up"
forgot to assign rt6_info to the inet6_ifaddr.
When disable the net device, the rt6_info which allocated
in init_loopback will not be destroied in __ipv6_ifa_notify.
This will trigger the waring message below
[23527.916091] unregister_netdevice: waiting for tap0 to become free. Usage count = 1
Reported-by: Arkadiusz Miskiewicz <a.miskiewicz@gmail.com>
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/addrconf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index d1b2d8034b54..1bbf744c2cc3 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -2658,8 +2658,10 @@ static void init_loopback(struct net_device *dev) | |||
2658 | sp_rt = addrconf_dst_alloc(idev, &sp_ifa->addr, 0); | 2658 | sp_rt = addrconf_dst_alloc(idev, &sp_ifa->addr, 0); |
2659 | 2659 | ||
2660 | /* Failure cases are ignored */ | 2660 | /* Failure cases are ignored */ |
2661 | if (!IS_ERR(sp_rt)) | 2661 | if (!IS_ERR(sp_rt)) { |
2662 | sp_ifa->rt = sp_rt; | ||
2662 | ip6_ins_rt(sp_rt); | 2663 | ip6_ins_rt(sp_rt); |
2664 | } | ||
2663 | } | 2665 | } |
2664 | read_unlock_bh(&idev->lock); | 2666 | read_unlock_bh(&idev->lock); |
2665 | } | 2667 | } |