mirror of
https://github.com/systemd/systemd
synced 2026-04-26 17:04:50 +02:00
Compare commits
No commits in common. "87d3b4ef3b30ba33fb74ee521e4936c2ec23081d" and "01af366ef91048a84e450ba6b4e2e452a5d62f7c" have entirely different histories.
87d3b4ef3b
...
01af366ef9
@ -328,10 +328,9 @@
|
|||||||
<literal>no</literal>.</para>
|
<literal>no</literal>.</para>
|
||||||
|
|
||||||
<para>Note that DHCPv6 will by default be triggered by Router Advertisement, if that is
|
<para>Note that DHCPv6 will by default be triggered by Router Advertisement, if that is
|
||||||
enabled, regardless of this parameter. By explicitly enabling DHCPv6 support here, the
|
enabled, regardless of this parameter. By enabling DHCPv6 support explicitly, the DHCPv6
|
||||||
DHCPv6 client will be started in the mode specified by the <variable>WithoutRA=</variable>
|
client will be started regardless of the presence of routers on the link, or what flags the
|
||||||
setting in the [DHCPv6] section, regardless of the presence of routers on the link, or
|
routers pass. See <literal>IPv6AcceptRA=</literal>.</para>
|
||||||
what flags the routers pass. See <literal>IPv6AcceptRA=</literal>.</para>
|
|
||||||
|
|
||||||
<para>Furthermore, note that by default the domain name specified through DHCP is not used
|
<para>Furthermore, note that by default the domain name specified through DHCP is not used
|
||||||
for name resolution. See option <option>UseDomains=</option> below.</para>
|
for name resolution. See option <option>UseDomains=</option> below.</para>
|
||||||
@ -2173,10 +2172,9 @@ Table=1234</programlisting></para>
|
|||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>WithoutRA=</varname></term>
|
<term><varname>WithoutRA=</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Allows DHCPv6 client to start without router advertisements's
|
<para>Allows DHCPv6 client to start without router advertisements's managed or other
|
||||||
<literal>managed</literal> or <literal>other configuration</literal> flag. Takes one of
|
address configuration flag. Takes one of <literal>no</literal>, <literal>solicit</literal>
|
||||||
<literal>no</literal>, <literal>solicit</literal>, or
|
or <literal>information-request</literal>. If this is not specified,
|
||||||
<literal>information-request</literal>. If this is not specified,
|
|
||||||
<literal>solicit</literal> is used when <varname>DHCPPrefixDelegation=</varname> is enabled
|
<literal>solicit</literal> is used when <varname>DHCPPrefixDelegation=</varname> is enabled
|
||||||
and <varname>UplinkInterface=:self</varname> is specified in the [DHCPPrefixDelegation]
|
and <varname>UplinkInterface=:self</varname> is specified in the [DHCPPrefixDelegation]
|
||||||
section. Otherwise, defaults to <literal>no</literal>, and the DHCPv6 client will be started
|
section. Otherwise, defaults to <literal>no</literal>, and the DHCPv6 client will be started
|
||||||
@ -2509,14 +2507,10 @@ Token=prefixstable:2002:da8:1::</programlisting></para>
|
|||||||
<term><varname>DHCPv6Client=</varname></term>
|
<term><varname>DHCPv6Client=</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Takes a boolean, or the special value <literal>always</literal>. When true, the
|
<para>Takes a boolean, or the special value <literal>always</literal>. When true, the
|
||||||
DHCPv6 client will be started in <literal>solicit</literal> mode if the RA has the
|
DHCPv6 client will be started when the RA has the managed or other information flag. If set
|
||||||
<literal>managed</literal> flag or <literal>information-request</literal> mode if the RA
|
to <literal>always</literal>, the DHCPv6 client will be started in managed mode when an RA
|
||||||
lacks the <literal>managed</literal> flag but has the
|
is received, even if neither managed nor other information flag is set in the RA. This will
|
||||||
<literal>other configuration</literal> flag. If set to <literal>always</literal>, the
|
be ignored when <varname>WithoutRA=</varname> in the [DHCPv6] section is enabled, or
|
||||||
DHCPv6 client will be started in <literal>solicit</literal> mode when an RA is received,
|
|
||||||
even if neither the <literal>managed</literal> nor the
|
|
||||||
<literal>other configuration</literal> flag is set in the RA. This will be ignored when
|
|
||||||
<varname>WithoutRA=</varname> in the [DHCPv6] section is enabled, or
|
|
||||||
<varname>UplinkInterface=:self</varname> in the [DHCPPrefixDelegation] section is
|
<varname>UplinkInterface=:self</varname> in the [DHCPPrefixDelegation] section is
|
||||||
specified. Defaults to true.</para>
|
specified. Defaults to true.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|||||||
@ -1384,7 +1384,7 @@ int sd_dhcp6_client_start(sd_dhcp6_client *client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
log_dhcp6_client(client, "Starting in %s mode",
|
log_dhcp6_client(client, "Starting in %s mode",
|
||||||
client->information_request ? "Information request" : "Solicit");
|
client->information_request ? "Information request" : "Managed");
|
||||||
|
|
||||||
return client_start_transaction(client, state);
|
return client_start_transaction(client, state);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,7 @@ static DHCP6ClientStartMode link_get_dhcp6_client_start_mode(Link *link) {
|
|||||||
if (link->network->dhcp6_client_start_mode >= 0)
|
if (link->network->dhcp6_client_start_mode >= 0)
|
||||||
return link->network->dhcp6_client_start_mode;
|
return link->network->dhcp6_client_start_mode;
|
||||||
|
|
||||||
/* When this interface itself is an uplink interface, then start dhcp6 client in solicit mode. */
|
/* When this interface itself is an uplink interface, then start dhcp6 client in managed mode. */
|
||||||
if (dhcp_pd_is_uplink(link, link, /* accept_auto = */ false))
|
if (dhcp_pd_is_uplink(link, link, /* accept_auto = */ false))
|
||||||
return DHCP6_CLIENT_START_MODE_SOLICIT;
|
return DHCP6_CLIENT_START_MODE_SOLICIT;
|
||||||
|
|
||||||
@ -686,7 +686,7 @@ static int dhcp6_configure(Link *link) {
|
|||||||
return log_link_debug_errno(link, r, "DHCPv6 CLIENT: Failed to %s requesting prefixes to be delegated: %m",
|
return log_link_debug_errno(link, r, "DHCPv6 CLIENT: Failed to %s requesting prefixes to be delegated: %m",
|
||||||
enable_disable(link->network->dhcp6_use_pd_prefix));
|
enable_disable(link->network->dhcp6_use_pd_prefix));
|
||||||
|
|
||||||
/* Even if UseAddress=no, we need to request IA_NA, as the dhcp6 client may be started in solicit mode. */
|
/* Even if UseAddress=no, we need to request IA_NA, as the dhcp6 client may be started in managed mode. */
|
||||||
r = sd_dhcp6_client_set_address_request(client, link->network->dhcp6_use_pd_prefix ? link->network->dhcp6_use_address : true);
|
r = sd_dhcp6_client_set_address_request(client, link->network->dhcp6_use_pd_prefix ? link->network->dhcp6_use_address : true);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_link_debug_errno(link, r, "DHCPv6 CLIENT: Failed to %s requesting address: %m",
|
return log_link_debug_errno(link, r, "DHCPv6 CLIENT: Failed to %s requesting address: %m",
|
||||||
|
|||||||
@ -949,13 +949,13 @@ static int ndisc_start_dhcp6_client(Link *link, sd_ndisc_router *rt) {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* (re)start DHCPv6 client in stateful or stateless mode according to RA flags.
|
/* (re)start DHCPv6 client in stateful or stateless mode according to RA flags.
|
||||||
* Note, if both "managed" and "other configuration" bits are set, then ignore
|
* Note, if both managed and other information bits are set, then ignore other
|
||||||
* "other configuration" bit. See RFC 4861. */
|
* information bit. See RFC 4861. */
|
||||||
r = dhcp6_start_on_ra(link, !(flags & ND_RA_FLAG_MANAGED));
|
r = dhcp6_start_on_ra(link, !(flags & ND_RA_FLAG_MANAGED));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IPV6_ACCEPT_RA_START_DHCP6_CLIENT_ALWAYS:
|
case IPV6_ACCEPT_RA_START_DHCP6_CLIENT_ALWAYS:
|
||||||
/* When IPv6AcceptRA.DHCPv6Client=always, start dhcp6 client in solicit mode
|
/* When IPv6AcceptRA.DHCPv6Client=always, start dhcp6 client in managed mode
|
||||||
* even if the router flags have neither M nor O flags. */
|
* even if the router flags have neither M nor O flags. */
|
||||||
r = dhcp6_start_on_ra(link, /* information_request = */ false);
|
r = dhcp6_start_on_ra(link, /* information_request = */ false);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -331,9 +331,9 @@ typedef enum JsonDispatchFlags {
|
|||||||
JSON_SAFE = 1 << 3, /* Don't accept "unsafe" strings in json_dispatch_string() + json_dispatch_string() */
|
JSON_SAFE = 1 << 3, /* Don't accept "unsafe" strings in json_dispatch_string() + json_dispatch_string() */
|
||||||
JSON_RELAX = 1 << 4, /* Use relaxed user name checking in json_dispatch_user_group_name */
|
JSON_RELAX = 1 << 4, /* Use relaxed user name checking in json_dispatch_user_group_name */
|
||||||
|
|
||||||
/* The following two may be passed into log_json() in addition to those above */
|
/* The following two may be passed into log_json() in addition to the three above */
|
||||||
JSON_DEBUG = 1 << 5, /* Indicates that this log message is a debug message */
|
JSON_DEBUG = 1 << 4, /* Indicates that this log message is a debug message */
|
||||||
JSON_WARNING = 1 << 6, /* Indicates that this log message is a warning message */
|
JSON_WARNING = 1 << 5, /* Indicates that this log message is a warning message */
|
||||||
} JsonDispatchFlags;
|
} JsonDispatchFlags;
|
||||||
|
|
||||||
typedef int (*JsonDispatchCallback)(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *userdata);
|
typedef int (*JsonDispatchCallback)(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *userdata);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user