netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Henrie <alexhenrie24@gmail.com>
To: netdev@vger.kernel.org, dan@danm.net, bagasdotme@gmail.com,
	davem@davemloft.net, dsahern@kernel.org, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, jikos@kernel.org
Cc: Alex Henrie <alexhenrie24@gmail.com>
Subject: [PATCH net-next v2 0/3] net: ipv6/addrconf: ensure that temporary addresses' preferred lifetimes are long enough
Date: Tue, 13 Feb 2024 23:26:29 -0700	[thread overview]
Message-ID: <20240214062711.608363-1-alexhenrie24@gmail.com> (raw)
In-Reply-To: <20240209061035.3757-1-alexhenrie24@gmail.com>

v2 corrects and updates the documentation for these features.

Changes from v1:
- Update the typical minimum lifetime stated in the documentation, and
  make it a range to emphasize the variability
- Fix spelling of "determine" in the documentation
- Mention RFC 8981's requirements in the documentation
- Arrange variables in "reverse Christmas tree"
- Update documentation of what happens if temp_prefered_lft is less
  than the minimum required lifetime

Thanks to David, Paolo, and Dan for your feedback.

Alex Henrie (3):
  net: ipv6/addrconf: ensure that regen_advance is at least 2 seconds
  net: ipv6/addrconf: introduce a regen_min_advance sysctl
  net: ipv6/addrconf: clamp preferred_lft to the minimum required

 Documentation/networking/ip-sysctl.rst | 14 +++++-
 include/linux/ipv6.h                   |  1 +
 include/net/addrconf.h                 |  5 +-
 net/ipv6/addrconf.c                    | 67 ++++++++++++++++++++------
 4 files changed, 68 insertions(+), 19 deletions(-)

Range-diff against v1:
1:  95ff3ac2f7a9 ! 1:  6978ee9a6d9e net: ipv6/addrconf: ensure that regen_advance is at least 2 seconds
    @@ Commit message
         Link: https://datatracker.ietf.org/doc/html/rfc8981#name-defined-protocol-parameters
         Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
     
    + ## Documentation/networking/ip-sysctl.rst ##
    +@@ Documentation/networking/ip-sysctl.rst: use_tempaddr - INTEGER
    + 
    + temp_valid_lft - INTEGER
    + 	valid lifetime (in seconds) for temporary addresses. If less than the
    +-	minimum required lifetime (typically 5 seconds), temporary addresses
    ++	minimum required lifetime (typically 5-7 seconds), temporary addresses
    + 	will not be created.
    + 
    + 	Default: 172800 (2 days)
    +@@ Documentation/networking/ip-sysctl.rst: temp_valid_lft - INTEGER
    + temp_prefered_lft - INTEGER
    + 	Preferred lifetime (in seconds) for temporary addresses. If
    + 	temp_prefered_lft is less than the minimum required lifetime (typically
    +-	5 seconds), temporary addresses will not be created. If
    ++	5-7 seconds), temporary addresses will not be created. If
    + 	temp_prefered_lft is greater than temp_valid_lft, the preferred lifetime
    + 	is temp_valid_lft.
    + 
    +
      ## net/ipv6/addrconf.c ##
     @@ net/ipv6/addrconf.c: static void ipv6_del_addr(struct inet6_ifaddr *ifp)
      	in6_ifa_put(ifp);
2:  c7f773887259 ! 2:  e2b3623db770 net: ipv6/addrconf: introduce a regen_min_advance sysctl
    @@ Documentation/networking/ip-sysctl.rst: max_desync_factor - INTEGER
     +	How far in advance (in seconds), at minimum, to create a new temporary
     +	address before the current one is deprecated. This value is added to
     +	the amount of time that may be required for duplicate address detection
    -+	to detemine when to create a new address.
    ++	to determine when to create a new address. Linux permits setting this
    ++	value to less than the default of 2 seconds, but a value less than 2
    ++	does not conform to RFC 8981.
     +
     +	Default: 2
     +
3:  b4e3dc5b3479 ! 3:  422f2a0a209e net: ipv6/addrconf: clamp preferred_lft to the minimum required
    @@ Commit message
         Link: https://serverfault.com/a/1031168/310447
         Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
     
    + ## Documentation/networking/ip-sysctl.rst ##
    +@@ Documentation/networking/ip-sysctl.rst: temp_valid_lft - INTEGER
    + temp_prefered_lft - INTEGER
    + 	Preferred lifetime (in seconds) for temporary addresses. If
    + 	temp_prefered_lft is less than the minimum required lifetime (typically
    +-	5-7 seconds), temporary addresses will not be created. If
    ++	5-7 seconds), the preferred lifetime is the minimum required. If
    + 	temp_prefered_lft is greater than temp_valid_lft, the preferred lifetime
    + 	is temp_valid_lft.
    + 
    +
      ## net/ipv6/addrconf.c ##
     @@ net/ipv6/addrconf.c: static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, bool block)
    + 	unsigned long tmp_tstamp, age;
      	unsigned long regen_advance;
      	unsigned long now = jiffies;
    - 	s32 cnf_temp_preferred_lft;
     +	u32 if_public_preferred_lft;
    + 	s32 cnf_temp_preferred_lft;
      	struct inet6_ifaddr *ift;
      	struct ifa6_config cfg;
    - 	long max_desync_factor;
     @@ net/ipv6/addrconf.c: static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, bool block)
      		}
      	}
-- 
2.43.1


  parent reply	other threads:[~2024-02-14  6:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-09  6:10 [PATCH net-next 1/3] net: ipv6/addrconf: ensure that regen_advance is at least 2 seconds Alex Henrie
2024-02-09  6:10 ` [PATCH net-next 2/3] net: ipv6/addrconf: introduce a regen_min_advance sysctl Alex Henrie
2024-02-13 15:36   ` David Ahern
2024-02-09  6:10 ` [PATCH net-next 3/3] net: ipv6/addrconf: clamp preferred_lft to the minimum required Alex Henrie
2024-02-13 10:13   ` Paolo Abeni
2024-02-13 15:40     ` David Ahern
2024-02-13 21:07       ` Dan Moulding
2024-02-13 15:35 ` [PATCH net-next 1/3] net: ipv6/addrconf: ensure that regen_advance is at least 2 seconds David Ahern
2024-02-14  6:26 ` Alex Henrie [this message]
2024-02-14  6:26   ` [PATCH net-next v2 " Alex Henrie
2024-02-14 15:38     ` David Ahern
2024-02-14  6:26   ` [PATCH net-next v2 2/3] net: ipv6/addrconf: introduce a regen_min_advance sysctl Alex Henrie
2024-02-14 15:39     ` David Ahern
2024-02-14  6:26   ` [PATCH net-next v2 3/3] net: ipv6/addrconf: clamp preferred_lft to the minimum required Alex Henrie
2024-02-14 15:40     ` David Ahern
2024-02-15 14:50   ` [PATCH net-next v2 0/3] net: ipv6/addrconf: ensure that temporary addresses' preferred lifetimes are long enough patchwork-bot+netdevbpf

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=20240214062711.608363-1-alexhenrie24@gmail.com \
    --to=alexhenrie24@gmail.com \
    --cc=bagasdotme@gmail.com \
    --cc=dan@danm.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=jikos@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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).