netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: yazzep@gmail.com, netdev@vger.kernel.org
Cc: Yasushi Asano <yasushi.asano@jp.fujitsu.com>
Subject: Re: [PATCH 1/1] ipv6 addrconf:fix preferred lifetime state-changing behavior while valid_lft is infinity
Date: Thu, 12 Dec 2013 18:06:56 +0400	[thread overview]
Message-ID: <52A9C300.2050403@cogentembedded.com> (raw)
In-Reply-To: <1386843347-2725-1-git-send-email-yazzep@gmail.com>

Hello.

On 12-12-2013 14:15, yazzep@gmail.com wrote:

> From: Yasushi Asano <yasushi.asano@jp.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@jp.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

  reply	other threads:[~2013-12-12 14:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-09  5:54 [PATCH 1/1] ipv6 addrconf:fix preferred lifetime state-changing behavior while valid_lft is infinity Asano, Yasushi
2013-12-09 23:47 ` Hannes Frederic Sowa
2013-12-12  0:58   ` Asano, Yasushi
2013-12-12  1:03     ` Hannes Frederic Sowa
2013-12-12 10:01       ` yazzep
2013-12-12 17:19         ` David Miller
2013-12-12 10:15       ` yazzep
2013-12-12 14:06         ` Sergei Shtylyov [this message]
2013-12-13 17:33         ` yazzep
2013-12-14  9:19           ` Hannes Frederic Sowa
2013-12-14  9:22             ` Hannes Frederic Sowa
2013-12-29  5:57             ` Asano, Yasushi
2013-12-29  7:34             ` [PATCH] " yasushi.asano
2013-12-29  7:47             ` yazzep
2013-12-29 15:32               ` Hannes Frederic Sowa
2013-12-30  2:17               ` Hannes Frederic Sowa
2013-12-31  3:04                 ` [PATCH] ipv6 addrconf: fix " Yasushi Asano
2013-12-31 19:05                   ` Hannes Frederic Sowa
2014-01-03  0:35                   ` David Miller
2013-12-29 12:04             ` [PATCH 1/1] ipv6 addrconf:fix " Yasushi Asano
2013-12-12 10:46       ` Asano, Yasushi

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=52A9C300.2050403@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=netdev@vger.kernel.org \
    --cc=yasushi.asano@jp.fujitsu.com \
    --cc=yazzep@gmail.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;
as well as URLs for NNTP newsgroup(s).