From: Eric Dumazet <eric.dumazet@gmail.com>
To: Julian Anastasov <ja@ssi.bg>
Cc: Sylvain Munaut <s.munaut@whatever-company.com>, netdev@vger.kernel.org
Subject: Re: IP fragmentation broken in 3.6-rc ?
Date: Tue, 21 Aug 2012 19:23:44 +0200 [thread overview]
Message-ID: <1345569824.5158.540.camel@edumazet-glaptop> (raw)
In-Reply-To: <alpine.LFD.2.00.1208211954380.2149@ja.ssi.bg>
On Tue, 2012-08-21 at 20:18 +0300, Julian Anastasov wrote:
> Hello,
>
> On Tue, 21 Aug 2012, Eric Dumazet wrote:
> > My first patch was :
> >
> > diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> > index e4ba974..9858714 100644
> > --- a/net/ipv4/route.c
> > +++ b/net/ipv4/route.c
> > @@ -956,6 +956,7 @@ static void ip_rt_update_pmtu(struct dst_entry *dst, struct sock *sk,
> > dst->obsolete = DST_OBSOLETE_KILL;
> > } else {
> > rt->rt_pmtu = mtu;
> > + rt->dst.expires = 0;
> > dst_set_expires(&rt->dst, ip_rt_mtu_expires);
>
> This is better, does not break ipv4_link_failure.
> There is a little race some ipv4_mtu() user to see
> rt_pmtu != 0 and dst.expires = 0 and to fail in time_after_eq
> test. May be that is why dst.expires is never set to 0.
> But I still don't understand what both changes fix.
In fact we re-enter ip_rt_update_pmtu() if we receive a second ICMP,
and rt->rt_pmtu is already set, but dst is expired.
Thats why Sylvain said it was not happening in the 10 minutes following
boot.
So calling again dst_set_expires(&rt->dst, ip_rt_mtu_expires) does
nothing : rt_pmtu is ignored because dst.expires is too old.
Maybe we should just do :
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index e4ba974..d0181e2 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -952,7 +952,7 @@ static void ip_rt_update_pmtu(struct dst_entry *dst, struct sock *sk,
ip_rt_build_flow_key(&fl4, sk, skb);
mtu = __ip_rt_update_pmtu(rt, &fl4, mtu);
- if (!rt->rt_pmtu) {
+ if (!rt->rt_pmtu || time_after_eq(jiffies, rt->dst.expires)) {
dst->obsolete = DST_OBSOLETE_KILL;
} else {
rt->rt_pmtu = mtu;
next prev parent reply other threads:[~2012-08-21 17:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-21 13:05 IP fragmentation broken in 3.6-rc ? Sylvain Munaut
2012-08-21 13:22 ` Eric Dumazet
2012-08-21 14:42 ` Eric Dumazet
2012-08-21 16:34 ` Julian Anastasov
2012-08-21 16:47 ` Eric Dumazet
2012-08-21 17:18 ` Julian Anastasov
2012-08-21 17:23 ` Eric Dumazet [this message]
2012-08-21 20:00 ` Julian Anastasov
2012-08-21 20:46 ` Eric Dumazet
2012-08-21 21:07 ` Julian Anastasov
2012-08-21 17:44 ` Sylvain Munaut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1345569824.5158.540.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=ja@ssi.bg \
--cc=netdev@vger.kernel.org \
--cc=s.munaut@whatever-company.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox