]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/ip6_fib.c
[ARM] 4650/1: AT91: New-style init of I2C, support for i2c-gpio
[linux-2.6-omap-h63xx.git] / net / ipv6 / ip6_fib.c
index ca08ee88d07f2913558c0ac331201f7d3a05527b..946cf389ab95716a27a98fda7ca448b99524993c 100644 (file)
@@ -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;
@@ -1322,7 +1313,7 @@ static int fib6_clean_node(struct fib6_walker_t *w)
 {
        int res;
        struct rt6_info *rt;
-       struct fib6_cleaner_t *c = (struct fib6_cleaner_t*)w;
+       struct fib6_cleaner_t *c = container_of(w, struct fib6_cleaner_t, w);
 
        for (rt = w->leaf; rt; rt = rt->u.dst.rt6_next) {
                res = c->func(rt, c->arg);
@@ -1483,7 +1474,7 @@ void __init fib6_init(void)
        fib6_node_kmem = kmem_cache_create("fib6_nodes",
                                           sizeof(struct fib6_node),
                                           0, SLAB_HWCACHE_ALIGN|SLAB_PANIC,
-                                          NULL, NULL);
+                                          NULL);
 
        fib6_tables_init();