[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 12 Dec 2013 18:06:56 +0400
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: yazzep@...il.com, netdev@...r.kernel.org
CC: Yasushi Asano <yasushi.asano@...fujitsu.com>
Subject: Re: [PATCH 1/1] ipv6 addrconf:fix preferred lifetime state-changing
behavior while valid_lft is infinity
Hello.
On 12-12-2013 14:15, yazzep@...il.com wrote:
> From: Yasushi Asano <yasushi.asano@...fujitsu.com>
> Fixed a problem with setting the lifetime of an IPv6
> address. When setting preferred_lft to a value not zero or
> infinity, while valid_lft is infinity(0xffffffff) preferred
> lifetime is set to forever and does not update. Therefore
> preferred lifetime never becomes deprecated. valid lifetime
> and preferred lifetime should be set independently, even if
> valid lifetime is infinity, preferred lifetime must expire
> correctly (meaning it must eventually become deprecated)
> Signed-off-by: Yasushi Asano <yasushi.asano@...fujitsu.com>
> ---
> net/ipv6/addrconf.c | 34 ++++++++++++++++++++--------------
> 1 files changed, 20 insertions(+), 14 deletions(-)
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> index 3c3425e..17b4097 100644
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -948,18 +948,22 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
[...]
> + if (ifp->valid_lft !=
> + INFINITY_LIFE_TIME) {
Please start the continuation line right under 'ifp', according to the
networking coding style -- this ways it's easier on the eyes and don't mix
with the following block.
> + spin_lock(&ifa->lock);
> +
> + lifetime = addrconf_timeout_fixup(
> + ifa->valid_lft, HZ);
> + /*
> + * Note: Because this address is
s/Because/because/, so that the grammar is correct.
> + * not permanent, lifetime <
> + * LONG_MAX / HZ here.
> + */
Networking code assumes slightly other style of multi-line comments:
/* bla
* bla
*/
WBR, Sergei
--
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