Skip to content

Commit 6c99493

Browse files
author
Xin Long
committed
ipv6: add exception routes to GC list in rt6_insert_exception
JIRA: https://issues.redhat.com/browse/RHEL-39466 JIRA: https://issues.redhat.com/browse/RHEL-84411 Tested: compile only commit cfe8246 Author: Xin Long <lucien.xin@gmail.com> Date: Tue Apr 8 13:46:17 2025 -0400 ipv6: add exception routes to GC list in rt6_insert_exception Commit 5eb902b ("net/ipv6: Remove expired routes with a separated list of routes.") introduced a separated list for managing route expiration via the GC timer. However, it missed adding exception routes (created by ip6_rt_update_pmtu() and rt6_do_redirect()) to this GC list. As a result, these exceptions were never considered for expiration and removal, leading to stale entries persisting in the routing table. This patch fixes the issue by calling fib6_add_gc_list() in rt6_insert_exception(), ensuring that exception routes are properly tracked and garbage collected when expired. Fixes: 5eb902b ("net/ipv6: Remove expired routes with a separated list of routes.") Reported-by: Jianlin Shi <jishi@redhat.com> Signed-off-by: Xin Long <lucien.xin@gmail.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://patch.msgid.link/837e7506ffb63f47faa2b05d9b85481aad28e1a4.1744134377.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Xin Long <lxin@redhat.com>
1 parent 554dcad commit 6c99493

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/ipv6/route.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,6 +1737,7 @@ static int rt6_insert_exception(struct rt6_info *nrt,
17371737
if (!err) {
17381738
spin_lock_bh(&f6i->fib6_table->tb6_lock);
17391739
fib6_update_sernum(net, f6i);
1740+
fib6_add_gc_list(f6i);
17401741
spin_unlock_bh(&f6i->fib6_table->tb6_lock);
17411742
fib6_force_start_gc(net);
17421743
}

0 commit comments

Comments
 (0)