From: Gao feng <gaofeng@cn.fujitsu.com>
To: Jiri Bohac <jbohac@suse.cz>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] ipv6: fix rt6_update_expires
Date: Wed, 18 Apr 2012 10:24:48 +0800 [thread overview]
Message-ID: <4F8E25F0.3040703@cn.fujitsu.com> (raw)
In-Reply-To: <20120416133439.GB18159@midget.suse.cz>
于 2012年04月16日 21:34, Jiri Bohac 写道:
>
> Commit 1716a961 (ipv6: fix problem with expired dst cache) broke PMTU
> discovery. rt6_update_expires() calls dst_set_expires(), which only updates
> dst->expires if it has not been set previously (expires == 0) or if the new
> expires is earlier than the current dst->expires.
>
> rt6_update_expires() needs to zero rt->dst.expires, otherwise it will contain
> ivalid data left over from rt->dst.from and will confuse dst_set_expires().
>
> Signed-off-by: Jiri Bohac <jbohac@suse.cz>
>
> diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
> index ad4126f..68c1f94 100644
> --- a/include/net/ip6_fib.h
> +++ b/include/net/ip6_fib.h
> @@ -143,8 +143,13 @@ static inline void rt6_set_expires(struct rt6_info *rt, unsigned long expires)
>
> static inline void rt6_update_expires(struct rt6_info *rt, int timeout)
> {
> - if (!(rt->rt6i_flags & RTF_EXPIRES) && rt->dst.from)
> - dst_release(rt->dst.from);
> + if (!(rt->rt6i_flags & RTF_EXPIRES)) {
> + if (rt->dst.from)
> + dst_release(rt->dst.from);
> + /* dst_set_expires relies on expires == 0
> + if it has not been set previously */
> + rt->dst.expires = 0;
> + }
>
> dst_set_expires(&rt->dst, timeout);
> rt->rt6i_flags |= RTF_EXPIRES;
>
looks good to me, thanks.
next prev parent reply other threads:[~2012-04-18 2:24 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-24 6:20 [PATCH] ipv6: Fix problem with expired dst cache Gao feng
2012-02-24 6:47 ` David Miller
2012-02-24 7:10 ` Gao feng
2012-02-24 9:27 ` Gao feng
2012-02-24 6:51 ` Eric Dumazet
2012-02-24 7:21 ` Gao feng
2012-02-27 6:36 ` [PATCH V2] " Gao feng
2012-02-29 9:26 ` Gao feng
2012-02-29 9:45 ` [PATCH] " Gao feng
2012-02-29 9:52 ` Gao feng
2012-02-29 10:07 ` [PATCH v3] " Gao feng
2012-02-29 12:14 ` Eric Dumazet
2012-03-01 0:43 ` Gao feng
2012-03-05 3:53 ` [PATCH v4] " Gao feng
2012-03-05 5:05 ` David Miller
2012-03-05 7:10 ` Gao feng
2012-03-05 7:16 ` [PATCH v5] " Gao feng
2012-03-06 7:01 ` RongQing Li
2012-03-06 7:10 ` RongQing Li
2012-03-17 5:33 ` David Miller
2012-03-19 0:49 ` Gao feng
2012-03-22 2:47 ` David Miller
2012-04-06 10:13 ` [PATCH v6] ipv6: fix " Gao feng
2012-04-13 16:58 ` David Miller
2012-04-16 13:34 ` [PATCH] ipv6: fix rt6_update_expires Jiri Bohac
2012-04-18 2:24 ` Gao feng [this message]
2012-04-18 2:32 ` David Miller
2012-04-16 13:35 ` [PATCH] ipv6: clean up rt6_clean_expires Jiri Bohac
2012-04-18 2:32 ` David Miller
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=4F8E25F0.3040703@cn.fujitsu.com \
--to=gaofeng@cn.fujitsu.com \
--cc=davem@davemloft.net \
--cc=jbohac@suse.cz \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.