Currently we can not flush cached pmtu/redirect informations via
the ipv4_sysctl_rtcache_flush sysctl. We need to check the rt_genid
of the old route and reset the nh exeption if the old route is
expired when we bind a new route to a nh exeption.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/ipv4/route.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
Hello,
On Thu, 18 Oct 2012, Steffen Klassert wrote:
quoted hunk
Currently we can not flush cached pmtu/redirect informations via
the ipv4_sysctl_rtcache_flush sysctl. We need to check the rt_genid
of the old route and reset the nh exeption if the old route is
expired when we bind a new route to a nh exeption.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/ipv4/route.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
May be the above rcu_assign_pointer should be after
... if (!rt->rt_gateway)
rt->rt_gateway = daddr;
part. It is possible another __mkroute_output
caller to get the cached fnhe->fnhe_rth without valid
rt->rt_gateway. rcu_assign_pointer should be after all
writes to rt.
quoted hunk
+ if (orig) {+ if (rt_is_expired(orig)) {+ fnhe->fnhe_gw = 0;+ fnhe->fnhe_pmtu = 0;+ fnhe->fnhe_expires = 0;+ }+ rt_free(orig);+ } if (fnhe->fnhe_pmtu) { unsigned long expires = fnhe->fnhe_expires; unsigned long diff = expires - jiffies;
On Thu, Oct 18, 2012 at 09:52:37AM +0300, Julian Anastasov wrote:
Hello,
On Thu, 18 Oct 2012, Steffen Klassert wrote:
quoted
Currently we can not flush cached pmtu/redirect informations via
the ipv4_sysctl_rtcache_flush sysctl. We need to check the rt_genid
of the old route and reset the nh exeption if the old route is
expired when we bind a new route to a nh exeption.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/ipv4/route.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
May be the above rcu_assign_pointer should be after
... if (!rt->rt_gateway)
rt->rt_gateway = daddr;
part. It is possible another __mkroute_output
caller to get the cached fnhe->fnhe_rth without valid
rt->rt_gateway. rcu_assign_pointer should be after all
writes to rt.
Currently we can not flush cached pmtu/redirect informations via
the ipv4_sysctl_rtcache_flush sysctl. We need to check the rt_genid
of the old route and reset the nh exeption if the old route is
expired when we bind a new route to a nh exeption.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/ipv4/route.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
From: Eric Dumazet <hidden> Date: 2012-10-18 07:40:40
On Thu, 2012-10-18 at 09:17 +0200, Steffen Klassert wrote:
quoted hunk
Currently we can not flush cached pmtu/redirect informations via
the ipv4_sysctl_rtcache_flush sysctl. We need to check the rt_genid
of the old route and reset the nh exeption if the old route is
expired when we bind a new route to a nh exeption.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/ipv4/route.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
Seems good to me. I'll have to rebase my patch, changing these
rcu_dereference() to rcu_dereference_protected() variant.
Acked-by: Eric Dumazet <redacted>
Currently we can not flush cached pmtu/redirect informations via
the ipv4_sysctl_rtcache_flush sysctl. We need to check the rt_genid
of the old route and reset the nh exeption if the old route is
expired when we bind a new route to a nh exeption.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>