The option must not be included in OPTION_REQUEST option.
See the "Client ORO" field in
https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-2
This deprecates RapidCommit= setting. Note that sd-dhcp6-client always
sets the RAPID_COMMIT option in the solicit message.
<literal>information-request</literal>. Defaults to unset.</para>
</listitem>
</varlistentry>
-
- <varlistentry>
- <term><varname>RapidCommit=</varname></term>
- <listitem>
- <para>Takes a boolean. The DHCPv6 client can obtain configuration parameters from a DHCPv6 server through
- a rapid two-message exchange (solicit and reply). When the rapid commit option is enabled by both
- the DHCPv6 client and the DHCPv6 server, the two-message exchange is used, rather than the default
- four-message exchange (solicit, advertise, request, and reply). The two-message exchange provides
- faster client configuration and is beneficial in environments in which networks are under a heavy load.
- See <ulink url="https://tools.ietf.org/html/rfc3315#section-17.2.1">RFC 3315</ulink> for details.
- Defaults to true.</para>
- </listitem>
- </varlistentry>
</variablelist>
</refsect1>
if (r < 0)
return log_link_debug_errno(link, r, "DHCPv6 CLIENT: Failed to set ifindex: %m");
- if (link->network->dhcp6_rapid_commit) {
- r = sd_dhcp6_client_set_request_option(client, SD_DHCP6_OPTION_RAPID_COMMIT);
- if (r < 0)
- return log_link_debug_errno(link, r, "DHCPv6 CLIENT: Failed to set request flag for rapid commit: %m");
- }
-
if (link->network->dhcp6_mudurl) {
r = sd_dhcp6_client_set_request_mud_url(client, link->network->dhcp6_mudurl);
if (r < 0)
DHCPv6.UseHostname, config_parse_bool, 0, offsetof(Network, dhcp6_use_hostname)
DHCPv6.UseDomains, config_parse_dhcp_use_domains, AF_INET6, 0
DHCPv6.UseNTP, config_parse_dhcp_use_ntp, AF_INET6, 0
-DHCPv6.RapidCommit, config_parse_bool, 0, offsetof(Network, dhcp6_rapid_commit)
DHCPv6.MUDURL, config_parse_mud_url, 0, offsetof(Network, dhcp6_mudurl)
DHCPv6.RequestOptions, config_parse_dhcp_request_options, AF_INET6, 0
DHCPv6.UserClass, config_parse_dhcp_user_or_vendor_class, AF_INET6, offsetof(Network, dhcp6_user_class)
DHCP.RouteTable, config_parse_dhcp_or_ra_route_table, (RTPROT_DHCP<<16) | AF_UNSPEC, 0
DHCP.UseTimezone, config_parse_bool, 0, offsetof(Network, dhcp_use_timezone)
DHCP.ListenPort, config_parse_uint16, 0, offsetof(Network, dhcp_client_port)
-DHCP.RapidCommit, config_parse_bool, 0, offsetof(Network, dhcp6_rapid_commit)
+DHCP.RapidCommit, config_parse_warn_compat, DISABLED_LEGACY, 0
DHCP.ForceDHCPv6PDOtherInformation, config_parse_bool, 0, offsetof(Network, dhcp6_force_pd_other_information)
DHCPv4.UseDomainName, config_parse_dhcp_use_domains, AF_INET, 0
DHCPv4.CriticalConnection, config_parse_tristate, 0, offsetof(Network, dhcp_critical)
DHCPv6.RouteMetric, config_parse_dhcp_or_ra_route_metric, AF_INET6, 0
+DHCPv6.RapidCommit, config_parse_warn_compat, DISABLED_LEGACY, 0
IPv6AcceptRA.DenyList, config_parse_in_addr_prefixes, AF_INET6, offsetof(Network, ndisc_deny_listed_prefix)
IPv6AcceptRA.BlackList, config_parse_in_addr_prefixes, AF_INET6, offsetof(Network, ndisc_deny_listed_prefix)
TrafficControlQueueingDiscipline.Parent, config_parse_qdisc_parent, _QDISC_KIND_INVALID, 0
.dhcp6_use_dns = true,
.dhcp6_use_hostname = true,
.dhcp6_use_ntp = true,
- .dhcp6_rapid_commit = true,
.dhcp6_duid.type = _DUID_TYPE_INVALID,
.dhcp6_pd = -1,
bool dhcp6_use_hostname;
bool dhcp6_use_ntp;
bool dhcp6_use_ntp_set;
- bool dhcp6_rapid_commit;
bool dhcp6_route_table;
bool dhcp6_route_table_set;
bool dhcp6_route_table_set_explicitly;
+++ /dev/null
-[Match]
-Name=veth99
-
-[Network]
-DHCP=ipv6
-
-[DHCPv6]
-RapidCommit=false
'dhcp-client-ipv4-only.network',
'dhcp-client-ipv4-use-routes-use-gateway.network',
'dhcp-client-ipv6-only.network',
- 'dhcp-client-ipv6-rapid-commit.network',
'dhcp-client-keep-configuration-dhcp-on-stop.network',
'dhcp-client-keep-configuration-dhcp.network',
'dhcp-client-listen-port.network',
self.assertNotRegex(output, r'9.9.9.9 via 192.168.5.[0-9]* proto dhcp src 192.168.5.[0-9]* metric 1024')
def test_dhcp_client_ipv4_ipv6(self):
- copy_unit_to_networkd_unit_path('25-veth.netdev', 'dhcp-server-veth-peer.network', 'dhcp-client-ipv6-only.network',
- 'dhcp-client-ipv4-only.network')
+ copy_unit_to_networkd_unit_path('25-veth.netdev', 'dhcp-server-veth-peer.network', 'dhcp-client-ipv4-only.network')
start_networkd()
self.wait_online(['veth-peer:carrier'])
start_dnsmasq()
self.assertTrue(search_words_in_dnsmasq_log('client provides name: test-hostname'))
self.assertTrue(search_words_in_dnsmasq_log('26:mtu'))
- def test_dhcp6_client_settings_rapidcommit_true(self):
- copy_unit_to_networkd_unit_path('25-veth.netdev', 'dhcp-server-veth-peer.network', 'dhcp-client-ipv6-only.network')
- start_networkd()
- self.wait_online(['veth-peer:carrier'])
- start_dnsmasq()
- self.wait_online(['veth99:routable', 'veth-peer:routable'])
-
- output = check_output('ip address show dev veth99')
- print(output)
- self.assertRegex(output, '12:34:56:78:9a:bc')
- self.assertTrue(search_words_in_dnsmasq_log('14:rapid-commit', True))
-
- def test_dhcp6_client_settings_rapidcommit_false(self):
- copy_unit_to_networkd_unit_path('25-veth.netdev', 'dhcp-server-veth-peer.network', 'dhcp-client-ipv6-rapid-commit.network')
- start_networkd()
- self.wait_online(['veth-peer:carrier'])
- start_dnsmasq()
- self.wait_online(['veth99:routable', 'veth-peer:routable'])
-
- output = check_output('ip address show dev veth99')
- print(output)
- self.assertRegex(output, '12:34:56:78:9a:bc')
- self.assertFalse(search_words_in_dnsmasq_log('14:rapid-commit', True))
-
def test_dhcp_client_settings_anonymize(self):
copy_unit_to_networkd_unit_path('25-veth.netdev', 'dhcp-server-veth-peer.network', 'dhcp-client-anonymize.network')
start_networkd()