提交 b886d5f2 编写于 作者: P Paolo Abeni 提交者: David S. Miller

ipv6: start fib6 gc on RTF_CACHE dst creation

After the commit 2b760fcf ("ipv6: hook up exception table
to store dst cache"), the fib6 gc is not started after the
creation of a RTF_CACHE via a redirect or pmtu update, since
fib6_add() isn't invoked anymore for such dsts.

We need the fib6 gc to run periodically to clean the RTF_CACHE,
or the dst will stay there forever.

Fix it by explicitly calling fib6_force_start_gc() on successful
exception creation. gc_args->more accounting will ensure that
the gc timer will run for whatever time needed to properly
clean the table.

v2 -> v3:
 - clarified the commit message

Fixes: 2b760fcf ("ipv6: hook up exception table to store dst cache")
Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
Acked-by: NWei Wang <weiwan@google.com>
Acked-by: NMartin KaFai Lau <kafai@fb.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7f9ad2ac
......@@ -1340,8 +1340,10 @@ static int rt6_insert_exception(struct rt6_info *nrt,
spin_unlock_bh(&rt6_exception_lock);
/* Update fn->fn_sernum to invalidate all cached dst */
if (!err)
if (!err) {
fib6_update_sernum(ort);
fib6_force_start_gc(net);
}
return err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册