ipv6: Implement draft-ietf-6man-rfc4941bis
Subsystems (4)
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
@@ -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
@@ -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
@@ -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
David Miller
maintainerFrom: 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.