networkd: RFC7844, add configuration variable
authorjuga0 <juga@riseup.net>
Sat, 29 Jul 2017 23:10:40 +0000 (01:10 +0200)
committerjuga0 <juga@riseup.net>
Wed, 6 Sep 2017 17:03:25 +0000 (19:03 +0200)
to enable Anonymity Profiles and document it.

man/systemd.network.xml
src/network/networkd-network-gperf.gperf
src/network/networkd-network.h

index 8b0f736..bdffcf5 100644 (file)
           </listitem>
         </varlistentry>
         <varlistentry>
+          <term><varname>Anonymize=</varname></term>
+          <listitem>
+            <para>Takes a boolean argument. When true, the options sent to the DHCP server will
+            follow the <ulink url="https://tools.ietf.org/html/rfc7844">RFC 7844</ulink>
+            (Anonymity Profiles for DHCP Clients) to minimize disclosure of identifying information.
+            Defaults to false.</para>
+
+            <para>This option should only be set to true when
+            <varname>MACAddressPolicy=</varname> is set to <literal>random</literal>
+            (see <citerefentry
+            project='man-pages'><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</para>
+
+            <para>Note that this configuration will overwrite others.
+            In concrete, the following variables will be ignored:
+            <varname>SendHostname=</varname>, <varname>ClientIdentifier=</varname>,
+            <varname>UseRoutes=</varname>, <varname>SendHostname=</varname>,
+            <varname>UseMTU=</varname>, <varname>VendorClassIdentifier=</varname>,
+            <varname>UseTimezone=</varname>.</para>
+          </listitem>
+        </varlistentry>
+        <varlistentry>
           <term><varname>SendHostname=</varname></term>
           <listitem>
             <para>When true (the default), the machine's hostname will
index 54385b5..7dab421 100644 (file)
@@ -101,6 +101,7 @@ DHCP.UseMTU,                            config_parse_bool,
 DHCP.UseHostname,                       config_parse_bool,                              0,                             offsetof(Network, dhcp_use_hostname)
 DHCP.UseDomains,                        config_parse_dhcp_use_domains,                  0,                             offsetof(Network, dhcp_use_domains)
 DHCP.UseRoutes,                         config_parse_bool,                              0,                             offsetof(Network, dhcp_use_routes)
+DHCP.Anonymize,                         config_parse_bool,                              0,                             offsetof(Network, dhcp_anonymize)
 DHCP.SendHostname,                      config_parse_bool,                              0,                             offsetof(Network, dhcp_send_hostname)
 DHCP.Hostname,                          config_parse_hostname,                          0,                             offsetof(Network, dhcp_hostname)
 DHCP.RequestBroadcast,                  config_parse_bool,                              0,                             offsetof(Network, dhcp_broadcast)
index d55e6f7..6c9c1ff 100644 (file)
@@ -128,6 +128,7 @@ struct Network {
         unsigned dhcp_route_metric;
         uint32_t dhcp_route_table;
         uint16_t dhcp_client_port;
+        bool dhcp_anonymize;
         bool dhcp_send_hostname;
         bool dhcp_broadcast;
         bool dhcp_critical;