[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1208212355060.2149@ja.ssi.bg>
Date: Wed, 22 Aug 2012 00:07:16 +0300 (EEST)
From: Julian Anastasov <ja@....bg>
To: Eric Dumazet <eric.dumazet@...il.com>
cc: Sylvain Munaut <s.munaut@...tever-company.com>,
netdev@...r.kernel.org
Subject: Re: IP fragmentation broken in 3.6-rc ?
Hello,
On Tue, 21 Aug 2012, Eric Dumazet wrote:
> > dst_update_expires will be like dst_set_expires
> > but with this difference (time_after):
> >
> > if (dst->expires == 0 || time_after(expires, dst->expires) ||
> > !timeout)
>
> Hmm, all these tests are not really needed, what about :
>
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index e4ba974..8d6d320 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -956,7 +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;
> - dst_set_expires(&rt->dst, ip_rt_mtu_expires);
> + rt->dst.expires = max(1UL, jiffies + ip_rt_mtu_expires);
The best solution, I think.
> }
> }
Regards
--
Julian Anastasov <ja@....bg>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists