Patch "ipv6: change route cache aging logic" has been added to the 4.15-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
ipv6: change route cache aging logic
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ipv6-change-route-cache-aging-logic.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Wed Feb 7 11:29:33 PST 2018
From: Wei Wang <[email protected]>
Date: Fri, 26 Jan 2018 11:40:17 -0800
Subject: ipv6: change route cache aging logic
From: Wei Wang <[email protected]>
[ Upstream commit 31afeb425f7fad8bcf9561aeb0b8405479f97a98 ]
In current route cache aging logic, if a route has both RTF_EXPIRE and RTF_GATEWAY set, the route will only be removed if the neighbor cache has no NTF_ROUTER flag. Otherwise, even if the route has expired, it won't get deleted.
Fix this logic to always check if the route has expired first and then do the gateway neighbor cache check if previous check decide to not remove the exception entry.
--- net/ipv6/route.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-)
net/ipv6/route.c +12 -8
@@ -1586,12 +1586,19 @@ static void rt6_age_examine_exception(st* EXPIRES exceptions - e.g. pmtu-generated ones are pruned when * expired, independently from their aging, as per RFC 8201 section 4 */ -if (!(rt->rt6i_flags &RTF_EXPIRES ) && -time_after_eq (now, rt->dst.lastuse + gc_args->timeout)) { -RT6_TRACE ("aging clone %p\n" , rt); +if (!(rt->rt6i_flags &RTF_EXPIRES )) { +if (time_after_eq (now, rt->dst.lastuse + gc_args->timeout)) { +RT6_TRACE ("aging clone %p\n" , rt); +rt6_remove_exception (bucket, rt6_ex); +return ; + } + }else if (time_after (jiffies, rt->dst.expires)) { +RT6_TRACE ("purging expired route %p\n" , rt);rt6_remove_exception (bucket, rt6_ex);return ; - }else if (rt->rt6i_flags &RTF_GATEWAY ) { + } + +if (rt->rt6i_flags &RTF_GATEWAY ) {struct neighbour *neigh;__u8 neigh_flags =0 ;
@@ -1606,11 +1613,8 @@ static void rt6_age_examine_exception(strt6_remove_exception (bucket, rt6_ex);return ; } - }else if (__rt6_check_expired (rt)) { -RT6_TRACE ("purging expired route %p\n" , rt); -rt6_remove_exception (bucket, rt6_ex); -return ; } + gc_args->more++; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.15/ipv6-change-route-cache-aging-logic.patch