Skip to contentSkip to conversation

ipv6: Implement draft-ietf-6man-rfc4941bis

PATCH Superseded Fernando Gont 2 participants 2 messages Apr 19, 2020 – Apr 23, 2020

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipv6: Implement draft-ietf-6man-rfc4941bis

Implement the upcoming rev of RFC4941 (IPv6 temporary addresses):
https://tools.ietf.org/html/draft-ietf-6man-rfc4941bis-09

* Reduces the default Valid Lifetime to 2 days
The number of extra addresses employed when Valid Lifetime was 7 days exacerbated the stress caused on network elements/devices. Additionally, the motivation for temporary addresses is indeed privacy and reduced exposure. With a default Valid Lifetime of 7 days, an address that becomes revealed by active communication is reachable and exposed for one whole week. The only use case for a Valid Lifetime of 7 days could be some application that is expecting to have long lived connections. But if you want to have a long lived connections, you shouldn't be using a temporary address in the first place. Additionally, in the era of mobile devices, general applications should nevertheless be prepared and robust to address changes (e.g. nodes swap wifi <-> 4G, etc.)

* Employs different IIDs for different prefixes
To avoid network activity correlation among addresses configured for different prefixes

* Uses a simpler algorithm for IID generation
No need to store "history" anywhere

---
 Documentation/networking/ip-sysctl.txt |  2 +-
 include/net/addrconf.h                 |  2 +-
 include/net/if_inet6.h                 |  1 -
 net/ipv6/addrconf.c                    | 85 +++++++++++---------------
 4 files changed, 38 insertions(+), 52 deletions(-)
Documentation/networking/ip-sysctl.txt +1 -1
index 6fcfd313dbe4..e9cf8cf022f7 100644
@@ -1807,7 +1807,7 @@ use_tempaddr - INTEGER
 
 temp_valid_lft - INTEGER
 	valid lifetime (in seconds) for temporary addresses.
-	Default: 604800 (7 days)
+	Default: 172800 (2 days)
 
 temp_prefered_lft - INTEGER
 	Preferred lifetime (in seconds) for temporary addresses.
include/net/addrconf.h +1 -1
index e0eabe58aa8b..37ecd7d322de 100644
@@ -8,7 +8,7 @@
 
 #define MIN_VALID_LIFETIME		(2*3600)	/* 2 hours */
 
-#define TEMP_VALID_LIFETIME		(7*86400)
+#define TEMP_VALID_LIFETIME		(2 * 86400)
 #define TEMP_PREFERRED_LIFETIME		(86400)
 #define REGEN_MAX_RETRY			(3)
 #define MAX_DESYNC_FACTOR		(600)
include/net/if_inet6.h +0 -1
index a01981d7108f..212eb278bda6 100644
@@ -190,7 +190,6 @@ struct inet6_dev {
 	int			dead;
 
 	u32			desync_factor;
-	u8			rndid[8];
 	struct list_head	tempaddr_list;
 
 	struct in6_addr		token;
net/ipv6/addrconf.c +36 -49

154 lines not on this page · raw message

Signature · 1 line
2.26.0
maintainer
#1 lore raw

From: Fernando Gont <[email protected]>
Date: Sun, 19 Apr 2020 09:16:58 -0300

Quoted 6 lines
net/ipv6/addrconf.c +0 -2
@@ -1306,12 +1304,11 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
 	in6_ifa_put(ifp);
 }
 
-static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp,
-				struct inet6_ifaddr *ift,

net/ipv6/addrconf.c static void ipv6_del_addr(struct inet6_ifaddr *ifp) · line 1314

Quoted 10 lines
net/ipv6/addrconf.c +3 -2
-				bool block)
+static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, bool block)
 {
 	struct inet6_dev *idev = ifp->idev;
-	struct in6_addr addr, *tmpaddr;
+	struct in6_addr addr;
+	struct inet6_ifaddr *ift;
 	unsigned long tmp_tstamp, age;
 	unsigned long regen_advance;
 	struct ifa6_config cfg;

Please preserve the reverse christmas tree ordering of local variables here.

Thank you.