<para>Allow setting custom port for the DHCP client to listen on.</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><varname>RapidCommit=</varname></term>
+ <listitem>
+ <para>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-method 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>
case SD_DHCP6_OPTION_DOMAIN_LIST:
case SD_DHCP6_OPTION_SNTP_SERVERS:
case SD_DHCP6_OPTION_NTP_SERVER:
+ case SD_DHCP6_OPTION_RAPID_COMMIT:
break;
default:
int dhcp6_configure(Link *link) {
sd_dhcp6_client *client = NULL;
- int r;
const DUID *duid;
+ int r;
assert(link);
+ assert(link->network);
if (link->dhcp6_client)
return 0;
if (r < 0)
goto error;
+ if (link->network->rapid_commit) {
+ r = sd_dhcp6_client_set_request_option(client, SD_DHCP6_OPTION_RAPID_COMMIT);
+ if (r < 0)
+ goto error;
+ }
+
r = sd_dhcp6_client_set_callback(client, dhcp6_handler, link);
if (r < 0)
goto error;
DHCP.UseTimezone, config_parse_bool, 0, offsetof(Network, dhcp_use_timezone)
DHCP.IAID, config_parse_iaid, 0, offsetof(Network, iaid)
DHCP.ListenPort, config_parse_uint16, 0, offsetof(Network, dhcp_client_port)
+DHCP.RapidCommit, config_parse_bool, 0, offsetof(Network, rapid_commit)
IPv6AcceptRA.UseDNS, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_dns)
IPv6AcceptRA.UseDomains, config_parse_dhcp_use_domains, 0, offsetof(Network, ipv6_accept_ra_use_domains)
IPv6AcceptRA.RouteTable, config_parse_uint32, 0, offsetof(Network, ipv6_accept_ra_route_table)
network->dhcp_use_mtu = false;
/* NOTE: from man: UseTimezone=... Defaults to "no".*/
network->dhcp_use_timezone = false;
+ network->rapid_commit = true;
network->dhcp_server_emit_dns = true;
network->dhcp_server_emit_ntp = true;
bool dhcp_use_mtu;
bool dhcp_use_routes;
bool dhcp_use_timezone;
+ bool rapid_commit;
bool dhcp_use_hostname;
bool dhcp_route_table_set;
DHCPUseDomains dhcp_use_domains;