Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnrc_ipv6_nib/SLAAC: rfc8981 temporary address (privacy extensions) #20369

Open
wants to merge 65 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
3d58132
includes
xnumad Feb 7, 2024
1fddb3b
config: Define feature flag
xnumad Feb 7, 2024
670176a
config: RFC params
xnumad Feb 7, 2024
55c3dab
Increase addr limit
xnumad Feb 7, 2024
6cbbcad
SLAAC only for /64 prefixes
xnumad Feb 7, 2024
bdf3988
config: RFC regen advance constant
xnumad Feb 7, 2024
b4fd28f
creation: Check IANA IID
xnumad Feb 7, 2024
2e05fac
IDGEN
xnumad Feb 7, 2024
f069a49
Check prefix existence
xnumad Feb 7, 2024
7e8a80a
Temporary address creation
xnumad Feb 7, 2024
81dcba8
coupling: Delete ta_pfx along with ta
xnumad Feb 7, 2024
88acfa1
Temporary address helper functions
xnumad Feb 7, 2024
1403842
Handle DAD failure for temporary address
xnumad Feb 7, 2024
6d146af
Temporary address helper function
xnumad Feb 7, 2024
dec0b26
coupling: Remove ta_pfxs if deleting SLAAC prefix
xnumad Feb 7, 2024
4d4f74c
regen: Define event type
xnumad Feb 7, 2024
5c7c1b3
regen: Delete event timer
xnumad Feb 7, 2024
84e3c14
Change return value
xnumad Feb 7, 2024
ae245f1
regen: Add timer on temp addr creation
xnumad Feb 7, 2024
d8b2a53
regen: Handle event
xnumad Feb 7, 2024
b4d588c
regen: reschedule on DAD failure
xnumad Feb 7, 2024
2800f76
retries: New flag
xnumad Feb 7, 2024
3a2a4cf
retries: Read flag
xnumad Feb 7, 2024
75e3dbe
retries: Set flag
xnumad Feb 7, 2024
81ee71e
creation: Add index param
xnumad Feb 7, 2024
c574857
regen: recover from reschedule failure
xnumad Feb 7, 2024
e3c2020
Implement rfc6724 Rule 7
xnumad Feb 7, 2024
ced8a8a
finalize: Wrap in IS_ACTIVE
xnumad Feb 7, 2024
72b8278
finalize: Doxygen and const params
xnumad Feb 7, 2024
fd96825
finalize: Link to HTML RFC
xnumad Feb 8, 2024
43af168
regen: Support deletion
xnumad Feb 8, 2024
2a92751
regen: Delete timer if retry limit reached
xnumad Feb 8, 2024
8303bf6
Rename
xnumad Feb 8, 2024
d07f103
Rename
xnumad Feb 8, 2024
eb6889d
Rename
xnumad Feb 8, 2024
fe1e208
Documentation for constant
xnumad Feb 8, 2024
14f85c2
Documentation
xnumad Feb 8, 2024
a4adfc0
finalize: whitespacecheck
xnumad Feb 8, 2024
c7902d8
finalize: doccheck
xnumad Feb 8, 2024
f8811d9
finalize: vera++ style check
xnumad Feb 8, 2024
addcd5d
Do not back up variable
xnumad Feb 8, 2024
d52ba25
Include
xnumad Feb 8, 2024
fc79a9a
Documentation
xnumad Feb 8, 2024
c009040
6lowpan: Register temporary address
xnumad Feb 9, 2024
2a0a53d
Documentation: backlink
xnumad Feb 9, 2024
d2039c4
Document
xnumad Feb 9, 2024
f4a35f6
fix compile on board
xnumad Feb 9, 2024
159dc1a
gnrc_netif_ipv6_addr_pfx_idx
xnumad Feb 9, 2024
e22592b
Supress SLAAC trigger also for 6lo
xnumad Feb 9, 2024
52a3e8b
Readability
xnumad Feb 9, 2024
4d34bab
ifconfig: Print TMP property
xnumad Feb 9, 2024
590521d
Documentation
xnumad Feb 10, 2024
e452a84
Adjust log levels
xnumad Feb 10, 2024
337feb1
fixup! gnrc_netif_ipv6_addr_pfx_idx
xnumad Feb 10, 2024
7e35d0a
fixup! gnrc_netif_ipv6_addr_pfx_idx
xnumad Feb 10, 2024
ac00481
fixup! creation: Add index param
xnumad Feb 10, 2024
c80961f
fixup! config: RFC params
xnumad Feb 11, 2024
964a81c
fixup! Handle DAD failure for temporary address
xnumad Feb 11, 2024
1bbf44d
fixup! Temporary address creation
xnumad Feb 11, 2024
c153aa7
docs: Wording
xnumad Feb 12, 2024
4481d1a
fix: Delete regen timer on deprecation
xnumad Feb 12, 2024
381f188
refactor: Remove prefix before its addresses
xnumad Mar 8, 2024
00dc1ae
refactor: Move regen event from SLAAC prefix to ta_pfx
xnumad May 19, 2024
0a4aff2
refactor: Extract duplicate code to method
xnumad May 19, 2024
b4439c7
Adjust for PR #20371
xnumad Sep 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
regen: Add timer on temp addr creation
  • Loading branch information
xnumad committed Sep 18, 2024
commit ae245f1d32973054aab7ef84ff2ba0495686c972
7 changes: 6 additions & 1 deletion sys/net/gnrc/network_layer/ipv6/nib/nib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1660,12 +1660,13 @@ static uint32_t _handle_pio(gnrc_netif_t *netif, const icmpv6_hdr_t *icmpv6,
DEBUG(" - Preferred lifetime: %" PRIu32 "\n",
byteorder_ntohl(pio->pref_ltime));

int32_t ta_max_pref_lft = 0;
if (pio->flags & NDP_OPT_PI_FLAGS_A
&& pio->prefix_len == SLAAC_PREFIX_LENGTH
&& !gnrc_ipv6_nib_pl_has_prefix(netif->pid, &pio->prefix, pio->prefix_len)
) {
_auto_configure_addr(netif, &pio->prefix, pio->prefix_len);
_generate_temporary_addr(netif, &pio->prefix, pref_ltime);
ta_max_pref_lft = _generate_temporary_addr(netif, &pio->prefix, pref_ltime);
}
if ((pio->flags & (NDP_OPT_PI_FLAGS_A | NDP_OPT_PI_FLAGS_L))
|| _multihop_p6c(netif, abr)) {
Expand Down Expand Up @@ -1705,6 +1706,10 @@ static uint32_t _handle_pio(gnrc_netif_t *netif, const icmpv6_hdr_t *icmpv6,
if (pio->flags & NDP_OPT_PI_FLAGS_A) {
pfx->flags |= _PFX_SLAAC;
}
if (ta_max_pref_lft > 0) {
// a temporary address was created
_evtimer_add(pfx, GNRC_IPV6_NIB_REGEN_TEMP_ADDR, &pfx->regen_temp_addr, ta_max_pref_lft - gnrc_netif_ipv6_regen_advance(netif));
}
return _min(pref_ltime, valid_ltime);
}
}
Expand Down