mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-27 14:03:43 +03:00
network: radv: shorten default lifetime of prefix, route prefix, DNS, and domains
See draft-ietf-6man-slaac-renum-02 section 4.1.1.
This commit is contained in:
parent
d951507d5d
commit
c9e2c2dae3
@ -2682,7 +2682,7 @@ Token=prefixstable:2002:da8:1::</programlisting></para>
|
||||
|
||||
<listitem><para>Lifetime in seconds for the DNS server addresses listed in
|
||||
<varname>DNS=</varname> and search domains listed in <varname>Domains=</varname>. Defaults to
|
||||
604800 seconds (one week).</para></listitem>
|
||||
3600 seconds (one hour).</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
@ -2721,10 +2721,9 @@ Token=prefixstable:2002:da8:1::</programlisting></para>
|
||||
<term><varname>PreferredLifetimeSec=</varname></term>
|
||||
<term><varname>ValidLifetimeSec=</varname></term>
|
||||
|
||||
<listitem><para>Preferred and valid lifetimes for the prefix measured in
|
||||
seconds. <varname>PreferredLifetimeSec=</varname> defaults to 604800
|
||||
seconds (one week) and <varname>ValidLifetimeSec=</varname> defaults
|
||||
to 2592000 seconds (30 days).</para></listitem>
|
||||
<listitem><para>Preferred and valid lifetimes for the prefix measured in seconds.
|
||||
<varname>PreferredLifetimeSec=</varname> defaults to 1800 seconds (30 minutes) and
|
||||
<varname>ValidLifetimeSec=</varname> defaults to 3600 seconds (one hour).</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
@ -2775,9 +2774,8 @@ Token=prefixstable:2002:da8:1::</programlisting></para>
|
||||
<varlistentry>
|
||||
<term><varname>LifetimeSec=</varname></term>
|
||||
|
||||
<listitem><para>Lifetime for the route prefix measured in
|
||||
seconds. <varname>LifetimeSec=</varname> defaults to 604800 seconds (one week).
|
||||
</para></listitem>
|
||||
<listitem><para>Lifetime for the route prefix measured in seconds.
|
||||
<varname>LifetimeSec=</varname> defaults to 3600 seconds (one hour).</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
@ -423,7 +423,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
|
||||
.dhcp_server_emit_timezone = true,
|
||||
|
||||
.router_lifetime_usec = RADV_DEFAULT_ROUTER_LIFETIME_USEC,
|
||||
.router_dns_lifetime_usec = 7 * USEC_PER_DAY,
|
||||
.router_dns_lifetime_usec = RADV_DEFAULT_VALID_LIFETIME_USEC,
|
||||
.router_emit_dns = true,
|
||||
.router_emit_domains = true,
|
||||
|
||||
|
@ -105,8 +105,8 @@ static int prefix_new_static(Network *network, const char *filename, unsigned se
|
||||
.network = network,
|
||||
.section = TAKE_PTR(n),
|
||||
|
||||
.preferred_lifetime = 7 * USEC_PER_DAY,
|
||||
.valid_lifetime = 30 * USEC_PER_DAY,
|
||||
.preferred_lifetime = RADV_DEFAULT_PREFERRED_LIFETIME_USEC,
|
||||
.valid_lifetime = RADV_DEFAULT_VALID_LIFETIME_USEC,
|
||||
.onlink = true,
|
||||
.address_auto_configuration = true,
|
||||
};
|
||||
@ -163,7 +163,7 @@ static int route_prefix_new_static(Network *network, const char *filename, unsig
|
||||
.network = network,
|
||||
.section = TAKE_PTR(n),
|
||||
|
||||
.lifetime = 7 * USEC_PER_DAY,
|
||||
.lifetime = RADV_DEFAULT_VALID_LIFETIME_USEC,
|
||||
};
|
||||
|
||||
r = hashmap_ensure_put(&network->route_prefixes_by_section, &network_config_hash_ops, prefix->section, prefix);
|
||||
@ -669,11 +669,11 @@ int radv_add_prefix(
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = sd_radv_prefix_set_preferred_lifetime(p, lifetime_preferred_usec, lifetime_preferred_usec);
|
||||
r = sd_radv_prefix_set_preferred_lifetime(p, RADV_DEFAULT_PREFERRED_LIFETIME_USEC, lifetime_preferred_usec);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = sd_radv_prefix_set_valid_lifetime(p, lifetime_valid_usec, lifetime_valid_usec);
|
||||
r = sd_radv_prefix_set_valid_lifetime(p, RADV_DEFAULT_VALID_LIFETIME_USEC, lifetime_valid_usec);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user