ipv6: introduce a new function fib6_update_sernum()
[linux-2.6-microblaze.git] / net / ipv6 / ip6_fib.c
index e5308d7..0ba4fbb 100644 (file)
@@ -110,6 +110,20 @@ enum {
        FIB6_NO_SERNUM_CHANGE = 0,
 };
 
+void fib6_update_sernum(struct rt6_info *rt)
+{
+       struct fib6_table *table = rt->rt6i_table;
+       struct net *net = dev_net(rt->dst.dev);
+       struct fib6_node *fn;
+
+       write_lock_bh(&table->tb6_lock);
+       fn = rcu_dereference_protected(rt->rt6i_node,
+                       lockdep_is_held(&table->tb6_lock));
+       if (fn)
+               fn->fn_sernum = fib6_new_sernum(net);
+       write_unlock_bh(&table->tb6_lock);
+}
+
 /*
  *     Auxiliary address test functions for the radix tree.
  *