struct fib6_walker_t w;
loff_t skip;
struct fib6_table *tbl;
+ __u32 sernum;
};
static int ipv6_route_seq_show(struct seq_file *seq, void *v)
iter->w.state = FWS_INIT;
iter->w.node = iter->w.root;
iter->w.args = iter;
+ iter->sernum = iter->w.root->fn_sernum;
INIT_LIST_HEAD(&iter->w.lh);
fib6_walker_link(&iter->w);
}
return hlist_entry_safe(node, struct fib6_table, tb6_hlist);
}
+static void ipv6_route_check_sernum(struct ipv6_route_iter *iter)
+{
+ if (iter->sernum != iter->w.root->fn_sernum) {
+ iter->sernum = iter->w.root->fn_sernum;
+ iter->w.state = FWS_INIT;
+ iter->w.node = iter->w.root;
+ WARN_ON(iter->w.skip);
+ iter->w.skip = iter->w.count;
+ }
+}
+
static void *ipv6_route_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
int r;
}
iter_table:
+ ipv6_route_check_sernum(iter);
read_lock(&iter->tbl->tb6_lock);
r = fib6_walk_continue(&iter->w);
read_unlock(&iter->tbl->tb6_lock);