]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/ip6_fib.c
device create: scsi: convert device_create to device_create_drvdata
[linux-2.6-omap-h63xx.git] / net / ipv6 / ip6_fib.c
index b0814b0082e744cc861789a5f20389643e5daed4..4de2b9efcacb144da807588975c501e4e291a46f 100644 (file)
@@ -5,8 +5,6 @@
  *     Authors:
  *     Pedro Roque             <roque@di.fc.ul.pt>
  *
- *     $Id: ip6_fib.c,v 1.25 2001/10/31 21:55:55 davem Exp $
- *
  *     This program is free software; you can redistribute it and/or
  *      modify it under the terms of the GNU General Public License
  *      as published by the Free Software Foundation; either version
@@ -346,7 +344,7 @@ end:
 
 static int inet6_dump_fib(struct sk_buff *skb, struct netlink_callback *cb)
 {
-       struct net *net = skb->sk->sk_net;
+       struct net *net = sock_net(skb->sk);
        unsigned int h, s_h;
        unsigned int e = 0, s_e;
        struct rt6_rtnl_dump_arg arg;
@@ -772,6 +770,10 @@ out:
                 * If fib6_add_1 has cleared the old leaf pointer in the
                 * super-tree leaf node we have to find a new one for it.
                 */
+               if (pn != fn && pn->leaf == rt) {
+                       pn->leaf = NULL;
+                       atomic_dec(&rt->rt6i_ref);
+               }
                if (pn != fn && !pn->leaf && !(pn->fn_flags & RTN_RTINFO)) {
                        pn->leaf = fib6_find_prefix(info->nl_net, pn);
 #if RT6_DEBUG >= 2
@@ -1539,7 +1541,7 @@ out_timer:
 static void fib6_net_exit(struct net *net)
 {
        rt6_ifdown(net, NULL);
-       del_timer(net->ipv6.ip6_fib_timer);
+       del_timer_sync(net->ipv6.ip6_fib_timer);
        kfree(net->ipv6.ip6_fib_timer);
 #ifdef CONFIG_IPV6_MULTIPLE_TABLES
        kfree(net->ipv6.fib6_local_tbl);