device: introduce ipv6.temp-valid-lifetime and ipv6.temp-preferred-lifetime properties

When IPv6 privacy extensions are enabled, by default temporary addresses
have a valid lifetime of 1 week and a preferred lifetime of 1 day.
That's far too long for privacy-conscious users, some of whom want a new
address once every few seconds. Add connection options that correspond
to /proc/sys/net/ipv6/conf/*/temp_valid_lft and
/proc/sys/net/ipv6/conf/*/temp_prefered_lft to allow configuring the
address rotation time on a per-connection basis.

The new properties are defined as 32-bit signed integers to match the
sysctl parameters which are also signed, although currently only
positive numbers are valid.
This commit is contained in:
Alex Henrie
2024-03-12 23:34:19 -06:00
parent 797f3cafee
commit 6cb14ae6a6
11 changed files with 1058 additions and 538 deletions

View File

@@ -1028,6 +1028,20 @@ ipv6.ip6-privacy=0
started.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>ipv6.temp-valid-lifetime</varname></term>
<listitem><para>If <literal>ipv6.temp-valid-lifetime</literal> is unset, fall back to the
original value of "/proc/sys/net/ipv6/conf/&lt;iface&gt;/temp_valid_lft" from before
NetworkManager started.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>ipv6.temp-preferred-lifetime</varname></term>
<listitem><para>If <literal>ipv6.temp-preferred-lifetime</literal> is unset, fall back to
the original value of "/proc/sys/net/ipv6/conf/&lt;iface&gt;/temp_prefered_lft" from
before NetworkManager started.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>ipv6.required-timeout</varname></term>
</varlistentry>