Patch "route: update fnhe_expires for redirect when the fnhe exists" has been added to the 4.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
route: update fnhe_expires for redirect when the fnhe exists
to the 4.14-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:
route-update-fnhe_expires-for-redirect-when-the-fnhe-exists.patch
and it can be found in the queue-4.14 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 Tue Dec 12 10:32:42 CET 2017
From: Xin Long <[email protected]>
Date: Fri, 17 Nov 2017 14:27:06 +0800
Subject: route: update fnhe_expires for redirect when the fnhe exists
From: Xin Long <[email protected]>
[ Upstream commit e39d5246111399dbc6e11cd39fd8580191b86c47 ]
Now when creating fnhe for redirect, it sets fnhe_expires for this new route cache. But when updating the exist one, it doesn't do it. It will cause this fnhe never to be expired.
Paolo already noticed it before, in Jianlin's test case, it became even worse:
When ip route flush cache, the old fnhe is not to be removed, but only clean it's members. When redirect comes again, this fnhe will be found and updated, but never be expired due to fnhe_expires not being set.
So fix it by simply updating fnhe_expires even it's for redirect.
--- net/ipv4/route.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
net/ipv4/route.c +2 -3
@@ -683,10 +683,9 @@ static void update_or_create_fnhe(struct fnhe->fnhe_genid = genid;if (gw) fnhe->fnhe_gw = gw; -if (pmtu) { +if (pmtu) fnhe->fnhe_pmtu = pmtu; - fnhe->fnhe_expires =max (1UL , expires); - } + fnhe->fnhe_expires =max (1UL , expires);/* Update all cached dsts too */ rt =rcu_dereference (fnhe->fnhe_rth_input);if (rt)
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/route-update-fnhe_expires-for-redirect-when-the-fnhe-exists.patch queue-4.14/route-also-update-fnhe_genid-when-updating-a-route-cache.patch queue-4.14/sctp-use-the-right-sk-after-waking-up-from-wait_buf-sleep.patch queue-4.14/sctp-do-not-free-asoc-when-it-is-already-dead-in-sctp_sendmsg.patch