mirror of
https://github.com/systemd/systemd
synced 2025-10-08 13:14:45 +02:00
Compare commits
14 Commits
bc32241e6a
...
4ab334472c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4ab334472c | ||
![]() |
b990afe152 | ||
![]() |
b7c3447a2f | ||
![]() |
169be51f94 | ||
![]() |
afb095e296 | ||
![]() |
dcad324eea | ||
![]() |
86d58c8625 | ||
![]() |
f90635f14f | ||
![]() |
0078195835 | ||
![]() |
a83bda058c | ||
![]() |
ae7ea5a7ba | ||
![]() |
57442d2dfe | ||
![]() |
dfc58b4740 | ||
![]() |
bc9e40c9a1 |
@ -1251,7 +1251,7 @@ evdev:input:b0003v1532p0200*
|
|||||||
KEYBOARD_KEY_c01cb=down # zoomout
|
KEYBOARD_KEY_c01cb=down # zoomout
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
# Micro Star
|
# MSI (aka "Micro Star")
|
||||||
###########################################################
|
###########################################################
|
||||||
|
|
||||||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pn*:*
|
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pn*:*
|
||||||
@ -1290,29 +1290,19 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*PR200*:*
|
|||||||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pnU90/U100:*
|
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pnU90/U100:*
|
||||||
KEYBOARD_KEY_e4=reserved
|
KEYBOARD_KEY_e4=reserved
|
||||||
|
|
||||||
# MSI Prestige15 A10SC specific keycodes. Needed for microphone and screen rotation
|
# Keymaps MSI Prestige And MSI Modern FnKeys and Special keys
|
||||||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*A10SC*:*
|
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*Prestige*:*
|
||||||
KEYBOARD_KEY_f1=f20
|
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*Modern*:*
|
||||||
KEYBOARD_KEY_f2=f21
|
KEYBOARD_KEY_56=backslash # Secondary backslash key
|
||||||
|
KEYBOARD_KEY_f1=f20 # Fn+F5 Micmute
|
||||||
# MSI Modern series
|
KEYBOARD_KEY_76=f21 # Fn+F4 Toggle touchpad, sends meta+ctrl+toggle
|
||||||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-StarInternational*:pnModern*:*
|
|
||||||
KEYBOARD_KEY_56=backslash # secondary backslash key
|
|
||||||
KEYBOARD_KEY_f1=f20 # Fn+F5 micmute
|
|
||||||
KEYBOARD_KEY_76=f21 # Fn+F4 touchpad, becomes meta+ctrl+toggle
|
|
||||||
KEYBOARD_KEY_91=prog1 # Fn+F7 Creation Center, sometime F7
|
KEYBOARD_KEY_91=prog1 # Fn+F7 Creation Center, sometime F7
|
||||||
KEYBOARD_KEY_f2=prog2 # Fn+F12 screen rotation
|
KEYBOARD_KEY_f2=prog2 # Fn+F12 Screen rotation
|
||||||
KEYBOARD_KEY_8d=prog3 # Fn+a
|
KEYBOARD_KEY_8d=prog3 # Fn+A Change True Color selections
|
||||||
KEYBOARD_KEY_8c=prog4 # Fn+z
|
KEYBOARD_KEY_8c=prog4 # Fn+Z Launch True Color
|
||||||
KEYBOARD_KEY_f5=fn_esc # Fn+esc toggle the behaviour of Fn keys
|
KEYBOARD_KEY_f5=fn_esc # Fn+esc Toggle the behaviour of Fn keys
|
||||||
KEYBOARD_KEY_97=unknown # lid close
|
KEYBOARD_KEY_97=unknown # Lid close
|
||||||
KEYBOARD_KEY_98=unknown # lid open
|
KEYBOARD_KEY_98=unknown # Lid open
|
||||||
# Fn+PrntScr sends meta+shift+s
|
|
||||||
|
|
||||||
|
|
||||||
###########################################################
|
|
||||||
# MSI
|
|
||||||
###########################################################
|
|
||||||
|
|
||||||
evdev:name:MSI Laptop hotkeys:dmi:bvn*:bvr*:bd*:svn*:pnM[iI][cC][rR][oO]-S[tT][aA][rR]*:*
|
evdev:name:MSI Laptop hotkeys:dmi:bvn*:bvr*:bd*:svn*:pnM[iI][cC][rR][oO]-S[tT][aA][rR]*:*
|
||||||
KEYBOARD_KEY_0213=f22
|
KEYBOARD_KEY_0213=f22
|
||||||
|
@ -48,10 +48,9 @@
|
|||||||
<title>Setup Information</title>
|
<title>Setup Information</title>
|
||||||
|
|
||||||
<para>The system must be running systemd with a full unified cgroup hierarchy for the expected cgroups-v2 features.
|
<para>The system must be running systemd with a full unified cgroup hierarchy for the expected cgroups-v2 features.
|
||||||
Furthermore, resource accounting must be turned on for all units monitored by <command>systemd-oomd</command>.
|
Furthermore, memory accounting must be turned on for all units monitored by <command>systemd-oomd</command>.
|
||||||
The easiest way to turn on resource accounting is by ensuring the values for <varname>DefaultCPUAccounting</varname>,
|
The easiest way to turn on memory accounting is by ensuring the value for <varname>DefaultMemoryAccounting=</varname>
|
||||||
<varname>DefaultIOAccounting</varname>, <varname>DefaultMemoryAccounting</varname>, and
|
is set to <constant>true</constant> in
|
||||||
<varname>DefaultTasksAccounting</varname> are set to <constant>true</constant> in
|
|
||||||
<citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
|
<citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
|
||||||
|
|
||||||
<para>You will need a kernel compiled with PSI support. This is available in Linux 4.20 and above.</para>
|
<para>You will need a kernel compiled with PSI support. This is available in Linux 4.20 and above.</para>
|
||||||
|
@ -1651,26 +1651,24 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
|
|||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>Anonymize=</varname></term>
|
<term><varname>Anonymize=</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Takes a boolean. When true, the options sent to the DHCP server will
|
<para>Takes a boolean. When true, the options sent to the DHCP server will follow the
|
||||||
follow the <ulink url="https://tools.ietf.org/html/rfc7844">RFC 7844</ulink>
|
<ulink url="https://tools.ietf.org/html/rfc7844">RFC 7844</ulink> (Anonymity Profiles for
|
||||||
(Anonymity Profiles for DHCP Clients) to minimize disclosure of identifying information.
|
DHCP Clients) to minimize disclosure of identifying information. Defaults to false.</para>
|
||||||
Defaults to false.</para>
|
|
||||||
|
|
||||||
<para>This option should only be set to true when
|
<para>This option should only be set to true when <varname>MACAddressPolicy=</varname> is
|
||||||
<varname>MACAddressPolicy=</varname> is set to <literal>random</literal>
|
set to <literal>random</literal> (see
|
||||||
(see <citerefentry
|
<citerefentry project='man-pages'><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
|
||||||
project='man-pages'><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</para>
|
</para>
|
||||||
|
|
||||||
<para>Note that this configuration will overwrite others.
|
<para>When true, <varname>SendHostname=</varname>, <varname>ClientIdentifier=</varname>,
|
||||||
In concrete, the following variables will be ignored:
|
<varname>VendorClassIdentifier=</varname>, <varname>UserClass=</varname>,
|
||||||
<varname>SendHostname=</varname>, <varname>ClientIdentifier=</varname>,
|
<varname>RequestOptions=</varname>, <varname>SendOption=</varname>,
|
||||||
<varname>UseRoutes=</varname>, <varname>UseMTU=</varname>,
|
<varname>SendVendorOption=</varname>, and <varname>MUDURL=</varname> are ignored.</para>
|
||||||
<varname>VendorClassIdentifier=</varname>, <varname>UseTimezone=</varname>.</para>
|
|
||||||
|
|
||||||
<para>With this option enabled DHCP requests will mimic those generated by Microsoft Windows, in
|
<para>With this option enabled DHCP requests will mimic those generated by Microsoft
|
||||||
order to reduce the ability to fingerprint and recognize installations. This means DHCP request
|
Windows, in order to reduce the ability to fingerprint and recognize installations. This
|
||||||
sizes will grow and lease data will be more comprehensive than normally, though most of the
|
means DHCP request sizes will grow and lease data will be more comprehensive than normally,
|
||||||
requested data is not actually used.</para>
|
though most of the requested data is not actually used.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
|
@ -57,6 +57,8 @@ void network_adjust_dhcp(Network *network) {
|
|||||||
"Disabling DHCPv6 client.", network->filename);
|
"Disabling DHCPv6 client.", network->filename);
|
||||||
SET_FLAG(network->dhcp, ADDRESS_FAMILY_IPV6, false);
|
SET_FLAG(network->dhcp, ADDRESS_FAMILY_IPV6, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
network_adjust_dhcp4(network);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct DUID fallback_duid = { .type = DUID_TYPE_EN };
|
static struct DUID fallback_duid = { .type = DUID_TYPE_EN };
|
||||||
|
@ -26,6 +26,31 @@
|
|||||||
static int dhcp4_update_address(Link *link, bool announce);
|
static int dhcp4_update_address(Link *link, bool announce);
|
||||||
static int dhcp4_remove_all(Link *link);
|
static int dhcp4_remove_all(Link *link);
|
||||||
|
|
||||||
|
void network_adjust_dhcp4(Network *network) {
|
||||||
|
assert(network);
|
||||||
|
|
||||||
|
if (!FLAGS_SET(network->dhcp, ADDRESS_FAMILY_IPV4))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (network->dhcp_use_gateway < 0)
|
||||||
|
network->dhcp_use_gateway = network->dhcp_use_routes;
|
||||||
|
|
||||||
|
/* RFC7844 section 3.: MAY contain the Client Identifier option
|
||||||
|
* Section 3.5: clients MUST use client identifiers based solely on the link-layer address
|
||||||
|
* NOTE: Using MAC, as it does not reveal extra information, and some servers might not answer
|
||||||
|
* if this option is not sent */
|
||||||
|
if (network->dhcp_anonymize &&
|
||||||
|
network->dhcp_client_identifier >= 0 &&
|
||||||
|
network->dhcp_client_identifier != DHCP_CLIENT_ID_MAC) {
|
||||||
|
log_warning("%s: ClientIdentifier= is set, although Anonymize=yes. Using ClientIdentifier=mac.",
|
||||||
|
network->filename);
|
||||||
|
network->dhcp_client_identifier = DHCP_CLIENT_ID_MAC;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (network->dhcp_client_identifier < 0)
|
||||||
|
network->dhcp_client_identifier = network->dhcp_anonymize ? DHCP_CLIENT_ID_MAC : DHCP_CLIENT_ID_DUID;
|
||||||
|
}
|
||||||
|
|
||||||
static int dhcp4_release_old_lease(Link *link) {
|
static int dhcp4_release_old_lease(Link *link) {
|
||||||
Route *route;
|
Route *route;
|
||||||
int k, r = 0;
|
int k, r = 0;
|
||||||
@ -1294,7 +1319,9 @@ int dhcp4_configure(Link *link) {
|
|||||||
if (!link_dhcp4_enabled(link))
|
if (!link_dhcp4_enabled(link))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!link->dhcp_client) {
|
if (link->dhcp_client)
|
||||||
|
return -EBUSY; /* Already configured. */
|
||||||
|
|
||||||
r = sd_dhcp_client_new(&link->dhcp_client, link->network->dhcp_anonymize);
|
r = sd_dhcp_client_new(&link->dhcp_client, link->network->dhcp_anonymize);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to allocate DHCP4 client: %m");
|
return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to allocate DHCP4 client: %m");
|
||||||
@ -1302,7 +1329,6 @@ int dhcp4_configure(Link *link) {
|
|||||||
r = sd_dhcp_client_attach_event(link->dhcp_client, link->manager->event, 0);
|
r = sd_dhcp_client_attach_event(link->dhcp_client, link->manager->event, 0);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to attach event to DHCP4 client: %m");
|
return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to attach event to DHCP4 client: %m");
|
||||||
}
|
|
||||||
|
|
||||||
r = sd_dhcp_client_set_mac(link->dhcp_client,
|
r = sd_dhcp_client_set_mac(link->dhcp_client,
|
||||||
link->hw_addr.addr.bytes,
|
link->hw_addr.addr.bytes,
|
||||||
@ -1329,18 +1355,14 @@ int dhcp4_configure(Link *link) {
|
|||||||
return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set MTU: %m");
|
return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set MTU: %m");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!link->network->dhcp_anonymize) {
|
||||||
if (link->network->dhcp_use_mtu) {
|
if (link->network->dhcp_use_mtu) {
|
||||||
r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_INTERFACE_MTU);
|
r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_INTERFACE_MTU);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for MTU: %m");
|
return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for MTU: %m");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* NOTE: even if this variable is called "use", it also "sends" PRL
|
if (link->network->dhcp_use_routes) {
|
||||||
* options, maybe there should be a different configuration variable
|
|
||||||
* to send or not route options?. */
|
|
||||||
/* NOTE: when using Anonymize=yes, routes PRL options are sent
|
|
||||||
* by default, so they don't need to be added here. */
|
|
||||||
if (link->network->dhcp_use_routes && !link->network->dhcp_anonymize) {
|
|
||||||
r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_STATIC_ROUTE);
|
r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_STATIC_ROUTE);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for static route: %m");
|
return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for static route: %m");
|
||||||
@ -1350,7 +1372,7 @@ int dhcp4_configure(Link *link) {
|
|||||||
return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for classless static route: %m");
|
return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for classless static route: %m");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (link->network->dhcp_use_domains != DHCP_USE_DOMAINS_NO && !link->network->dhcp_anonymize) {
|
if (link->network->dhcp_use_domains != DHCP_USE_DOMAINS_NO) {
|
||||||
r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_DOMAIN_SEARCH_LIST);
|
r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_DOMAIN_SEARCH_LIST);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for domain search list: %m");
|
return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for domain search list: %m");
|
||||||
@ -1420,6 +1442,7 @@ int dhcp4_configure(Link *link) {
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set user class: %m");
|
return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set user class: %m");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (link->network->dhcp_client_port > 0) {
|
if (link->network->dhcp_client_port > 0) {
|
||||||
r = sd_dhcp_client_set_client_port(link->dhcp_client, link->network->dhcp_client_port);
|
r = sd_dhcp_client_set_client_port(link->dhcp_client, link->network->dhcp_client_port);
|
||||||
|
@ -17,6 +17,7 @@ typedef enum DHCPClientIdentifier {
|
|||||||
_DHCP_CLIENT_ID_INVALID = -EINVAL,
|
_DHCP_CLIENT_ID_INVALID = -EINVAL,
|
||||||
} DHCPClientIdentifier;
|
} DHCPClientIdentifier;
|
||||||
|
|
||||||
|
void network_adjust_dhcp4(Network *network);
|
||||||
int dhcp4_configure(Link *link);
|
int dhcp4_configure(Link *link);
|
||||||
int dhcp4_update_mac(Link *link);
|
int dhcp4_update_mac(Link *link);
|
||||||
|
|
||||||
|
@ -1456,7 +1456,7 @@ int dhcp6_configure(Link *link) {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (link->dhcp6_client)
|
if (link->dhcp6_client)
|
||||||
return 0;
|
return -EBUSY;
|
||||||
|
|
||||||
r = sd_dhcp6_client_new(&client);
|
r = sd_dhcp6_client_new(&client);
|
||||||
if (r == -ENOMEM)
|
if (r == -ENOMEM)
|
||||||
|
@ -151,7 +151,9 @@ int ipv4ll_configure(Link *link) {
|
|||||||
if (!link_ipv4ll_enabled(link))
|
if (!link_ipv4ll_enabled(link))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!link->ipv4ll) {
|
if (link->ipv4ll)
|
||||||
|
return -EBUSY;
|
||||||
|
|
||||||
r = sd_ipv4ll_new(&link->ipv4ll);
|
r = sd_ipv4ll_new(&link->ipv4ll);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
@ -159,7 +161,6 @@ int ipv4ll_configure(Link *link) {
|
|||||||
r = sd_ipv4ll_attach_event(link->ipv4ll, link->manager->event, 0);
|
r = sd_ipv4ll_attach_event(link->ipv4ll, link->manager->event, 0);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
}
|
|
||||||
|
|
||||||
if (link->sd_device &&
|
if (link->sd_device &&
|
||||||
net_get_unique_predictable_data(link->sd_device, true, &seed) >= 0) {
|
net_get_unique_predictable_data(link->sd_device, true, &seed) >= 0) {
|
||||||
|
@ -2834,6 +2834,12 @@ static int link_update(Link *link, sd_netlink_message *m) {
|
|||||||
return log_link_warning_errno(link, r, "Could not update MAC for NDisc: %m");
|
return log_link_warning_errno(link, r, "Could not update MAC for NDisc: %m");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (link->lldp) {
|
||||||
|
r = sd_lldp_set_filter_address(link->lldp, &link->hw_addr.addr.ether);
|
||||||
|
if (r < 0)
|
||||||
|
return log_link_warning_errno(link, r, "Could not update MAC address for LLDP: %m");
|
||||||
|
}
|
||||||
|
|
||||||
r = ipv4_dad_update_mac(link);
|
r = ipv4_dad_update_mac(link);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_link_warning_errno(link, r, "Could not update MAC address in IPv4 ACD client: %m");
|
return log_link_warning_errno(link, r, "Could not update MAC address in IPv4 ACD client: %m");
|
||||||
|
@ -73,7 +73,9 @@ int link_lldp_rx_configure(Link *link) {
|
|||||||
if (!link_lldp_rx_enabled(link))
|
if (!link_lldp_rx_enabled(link))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!link->lldp) {
|
if (link->lldp)
|
||||||
|
return -EBUSY;
|
||||||
|
|
||||||
r = sd_lldp_new(&link->lldp);
|
r = sd_lldp_new(&link->lldp);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
@ -81,7 +83,6 @@ int link_lldp_rx_configure(Link *link) {
|
|||||||
r = sd_lldp_attach_event(link->lldp, link->manager->event, 0);
|
r = sd_lldp_attach_event(link->lldp, link->manager->event, 0);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
}
|
|
||||||
|
|
||||||
r = sd_lldp_set_ifindex(link->lldp, link->ifindex);
|
r = sd_lldp_set_ifindex(link->lldp, link->ifindex);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
|
@ -1316,7 +1316,7 @@ int ndisc_configure(Link *link) {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (link->ndisc)
|
if (link->ndisc)
|
||||||
return 0; /* Already configured. */
|
return -EBUSY; /* Already configured. */
|
||||||
|
|
||||||
r = sd_ndisc_new(&link->ndisc);
|
r = sd_ndisc_new(&link->ndisc);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
|
@ -41,45 +41,6 @@
|
|||||||
/* Let's assume that anything above this number is a user misconfiguration. */
|
/* Let's assume that anything above this number is a user misconfiguration. */
|
||||||
#define MAX_NTP_SERVERS 128
|
#define MAX_NTP_SERVERS 128
|
||||||
|
|
||||||
/* Set defaults following RFC7844 */
|
|
||||||
void network_apply_anonymize_if_set(Network *network) {
|
|
||||||
if (!network->dhcp_anonymize)
|
|
||||||
return;
|
|
||||||
/* RFC7844 3.7
|
|
||||||
SHOULD NOT send the Host Name option */
|
|
||||||
network->dhcp_send_hostname = false;
|
|
||||||
/* RFC7844 section 3.:
|
|
||||||
MAY contain the Client Identifier option
|
|
||||||
Section 3.5:
|
|
||||||
clients MUST use client identifiers based solely
|
|
||||||
on the link-layer address */
|
|
||||||
/* NOTE: Using MAC, as it does not reveal extra information,
|
|
||||||
* and some servers might not answer if this option is not sent */
|
|
||||||
network->dhcp_client_identifier = DHCP_CLIENT_ID_MAC;
|
|
||||||
/* RFC 7844 3.10:
|
|
||||||
SHOULD NOT use the Vendor Class Identifier option */
|
|
||||||
network->dhcp_vendor_class_identifier = mfree(network->dhcp_vendor_class_identifier);
|
|
||||||
/* RFC7844 section 3.6.:
|
|
||||||
The client intending to protect its privacy SHOULD only request a
|
|
||||||
minimal number of options in the PRL and SHOULD also randomly shuffle
|
|
||||||
the ordering of option codes in the PRL. If this random ordering
|
|
||||||
cannot be implemented, the client MAY order the option codes in the
|
|
||||||
PRL by option code number (lowest to highest).
|
|
||||||
*/
|
|
||||||
/* NOTE: dhcp_use_mtu is false by default,
|
|
||||||
* though it was not initiallized to any value in network_load_one.
|
|
||||||
* Maybe there should be another var called *send*?
|
|
||||||
* (to use the MTU sent by the server but to do not send
|
|
||||||
* the option in the PRL). */
|
|
||||||
network->dhcp_use_mtu = false;
|
|
||||||
/* NOTE: when Anonymize=yes, the PRL route options are sent by default,
|
|
||||||
* but this is needed to use them. */
|
|
||||||
network->dhcp_use_routes = true;
|
|
||||||
/* RFC7844 section 3.6.
|
|
||||||
* same comments as previous option */
|
|
||||||
network->dhcp_use_timezone = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int network_resolve_netdev_one(Network *network, const char *name, NetDevKind kind, NetDev **ret_netdev) {
|
static int network_resolve_netdev_one(Network *network, const char *name, NetDevKind kind, NetDev **ret_netdev) {
|
||||||
const char *kind_string;
|
const char *kind_string;
|
||||||
NetDev *netdev;
|
NetDev *netdev;
|
||||||
@ -223,9 +184,6 @@ int network_verify(Network *network) {
|
|||||||
network->dhcp_use_mtu = false;
|
network->dhcp_use_mtu = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (network->dhcp_use_gateway < 0)
|
|
||||||
network->dhcp_use_gateway = network->dhcp_use_routes;
|
|
||||||
|
|
||||||
if (network->dhcp_critical >= 0) {
|
if (network->dhcp_critical >= 0) {
|
||||||
if (network->keep_configuration >= 0)
|
if (network->keep_configuration >= 0)
|
||||||
log_warning("%s: Both KeepConfiguration= and deprecated CriticalConnection= are set. "
|
log_warning("%s: Both KeepConfiguration= and deprecated CriticalConnection= are set. "
|
||||||
@ -340,11 +298,9 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
|
|||||||
.allmulticast = -1,
|
.allmulticast = -1,
|
||||||
.promiscuous = -1,
|
.promiscuous = -1,
|
||||||
|
|
||||||
.configure_without_carrier = false,
|
|
||||||
.ignore_carrier_loss = -1,
|
.ignore_carrier_loss = -1,
|
||||||
.keep_configuration = _KEEP_CONFIGURATION_INVALID,
|
.keep_configuration = _KEEP_CONFIGURATION_INVALID,
|
||||||
|
|
||||||
.dhcp = ADDRESS_FAMILY_NO,
|
|
||||||
.duid.type = _DUID_TYPE_INVALID,
|
.duid.type = _DUID_TYPE_INVALID,
|
||||||
.dhcp_critical = -1,
|
.dhcp_critical = -1,
|
||||||
.dhcp_use_ntp = true,
|
.dhcp_use_ntp = true,
|
||||||
@ -353,20 +309,11 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
|
|||||||
.dhcp_use_hostname = true,
|
.dhcp_use_hostname = true,
|
||||||
.dhcp_use_routes = true,
|
.dhcp_use_routes = true,
|
||||||
.dhcp_use_gateway = -1,
|
.dhcp_use_gateway = -1,
|
||||||
/* NOTE: this var might be overwritten by network_apply_anonymize_if_set */
|
|
||||||
.dhcp_send_hostname = true,
|
.dhcp_send_hostname = true,
|
||||||
.dhcp_send_release = true,
|
.dhcp_send_release = true,
|
||||||
/* To enable/disable RFC7844 Anonymity Profiles */
|
|
||||||
.dhcp_anonymize = false,
|
|
||||||
.dhcp_route_metric = DHCP_ROUTE_METRIC,
|
.dhcp_route_metric = DHCP_ROUTE_METRIC,
|
||||||
/* NOTE: this var might be overwritten by network_apply_anonymize_if_set */
|
.dhcp_client_identifier = _DHCP_CLIENT_ID_INVALID,
|
||||||
.dhcp_client_identifier = DHCP_CLIENT_ID_DUID,
|
|
||||||
.dhcp_route_table = RT_TABLE_MAIN,
|
.dhcp_route_table = RT_TABLE_MAIN,
|
||||||
.dhcp_route_table_set = false,
|
|
||||||
/* NOTE: from man: UseMTU=... Defaults to false*/
|
|
||||||
.dhcp_use_mtu = false,
|
|
||||||
/* NOTE: from man: UseTimezone=... Defaults to "no".*/
|
|
||||||
.dhcp_use_timezone = false,
|
|
||||||
.dhcp_ip_service_type = -1,
|
.dhcp_ip_service_type = -1,
|
||||||
|
|
||||||
.dhcp6_use_address = true,
|
.dhcp6_use_address = true,
|
||||||
@ -432,7 +379,6 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
|
|||||||
.ipv6_accept_ra_use_autonomous_prefix = true,
|
.ipv6_accept_ra_use_autonomous_prefix = true,
|
||||||
.ipv6_accept_ra_use_onlink_prefix = true,
|
.ipv6_accept_ra_use_onlink_prefix = true,
|
||||||
.ipv6_accept_ra_route_table = RT_TABLE_MAIN,
|
.ipv6_accept_ra_route_table = RT_TABLE_MAIN,
|
||||||
.ipv6_accept_ra_route_table_set = false,
|
|
||||||
.ipv6_accept_ra_start_dhcp6_client = IPV6_ACCEPT_RA_START_DHCP6_CLIENT_YES,
|
.ipv6_accept_ra_start_dhcp6_client = IPV6_ACCEPT_RA_START_DHCP6_CLIENT_YES,
|
||||||
|
|
||||||
.can_triple_sampling = -1,
|
.can_triple_sampling = -1,
|
||||||
@ -505,8 +451,6 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
network_apply_anonymize_if_set(network);
|
|
||||||
|
|
||||||
r = network_add_ipv4ll_route(network);
|
r = network_add_ipv4ll_route(network);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
log_warning_errno(r, "%s: Failed to add IPv4LL route, ignoring: %m", network->filename);
|
log_warning_errno(r, "%s: Failed to add IPv4LL route, ignoring: %m", network->filename);
|
||||||
|
@ -644,6 +644,9 @@ int radv_configure(Link *link) {
|
|||||||
if (!link_radv_enabled(link))
|
if (!link_radv_enabled(link))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (link->radv)
|
||||||
|
return -EBUSY;
|
||||||
|
|
||||||
r = sd_radv_new(&link->radv);
|
r = sd_radv_new(&link->radv);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user