Message ID | fd290b544e615a1452622860ac61d214423e15ec.1411249633.git.hannes@stressinduktion.org |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 0725fc1..8db8b1c 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -1518,6 +1518,12 @@ static int fib6_clean_node(struct fib6_walker_t *w) if (c->sernum != FIB6_NO_SERNUM_CHANGE) c->w.node->fn_sernum = c->sernum; + if (!c->func) { + WARN_ON_ONCE(c->sernum == FIB6_NO_SERNUM_CHANGE); + w->leaf = NULL; + return 0; + } + for (rt = w->leaf; rt; rt = rt->dst.rt6_next) { res = c->func(rt, c->arg); if (res < 0) {
We now allow NULL rt6_info walker functions to we only visit nodes. Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Vlad Yasevich <vyasevich@gmail.com> Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com> Cc: Martin Lau <kafai@fb.com> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> --- net/ipv6/ip6_fib.c | 6 ++++++ 1 file changed, 6 insertions(+)