[IPV6]: Restore semantics of Routing Header processing.
[linux-2.6-block.git] / net / ipv6 / ip6_fib.c
index 268f476ef3dbe34aafaedc9d089d381da76f7667..662a7d9681fdb03b4c2a9c089ec4dffdcfb2f4d2 100644 (file)
@@ -359,7 +359,7 @@ end:
        return res;
 }
 
-int inet6_dump_fib(struct sk_buff *skb, struct netlink_callback *cb)
+static int inet6_dump_fib(struct sk_buff *skb, struct netlink_callback *cb)
 {
        unsigned int h, s_h;
        unsigned int e = 0, s_e;
@@ -619,14 +619,6 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,
 
        ins = &fn->leaf;
 
-       if (fn->fn_flags&RTN_TL_ROOT &&
-           fn->leaf == &ip6_null_entry &&
-           !(rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF)) ){
-               fn->leaf = rt;
-               rt->u.dst.rt6_next = NULL;
-               goto out;
-       }
-
        for (iter = fn->leaf; iter; iter=iter->u.dst.rt6_next) {
                /*
                 *      Search for duplicates
@@ -666,7 +658,6 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,
         *      insert node
         */
 
-out:
        rt->u.dst.rt6_next = iter;
        *ins = rt;
        rt->rt6i_node = fn;
@@ -1486,6 +1477,8 @@ void __init fib6_init(void)
                                           NULL, NULL);
 
        fib6_tables_init();
+
+       __rtnl_register(PF_INET6, RTM_GETROUTE, NULL, inet6_dump_fib);
 }
 
 void fib6_gc_cleanup(void)