network: prohibit to set MTUBytes= and UseMTU= simultaneously
This commit is contained in:
parent
55dc8c4a82
commit
7169cdc8b9
|
@ -1167,6 +1167,7 @@
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>When true, the interface maximum transmission unit
|
<para>When true, the interface maximum transmission unit
|
||||||
from the DHCP server will be used on the current link.
|
from the DHCP server will be used on the current link.
|
||||||
|
If <varname>MTUBytes=</varname> is set, then this setting is ignored.
|
||||||
Defaults to false.</para>
|
Defaults to false.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
|
@ -281,6 +281,12 @@ static int network_load_one(Manager *manager, const char *filename) {
|
||||||
if (network->ip_masquerade)
|
if (network->ip_masquerade)
|
||||||
network->ip_forward |= ADDRESS_FAMILY_IPV4;
|
network->ip_forward |= ADDRESS_FAMILY_IPV4;
|
||||||
|
|
||||||
|
if (network->mtu > 0 && network->dhcp_use_mtu) {
|
||||||
|
log_warning("MTUBytes= in [Link] section and UseMTU= in [DHCP] section are set in %s. "
|
||||||
|
"Disabling UseMTU=.", filename);
|
||||||
|
network->dhcp_use_mtu = false;
|
||||||
|
}
|
||||||
|
|
||||||
LIST_PREPEND(networks, manager->networks, network);
|
LIST_PREPEND(networks, manager->networks, network);
|
||||||
|
|
||||||
r = hashmap_ensure_allocated(&manager->networks_by_name, &string_hash_ops);
|
r = hashmap_ensure_allocated(&manager->networks_by_name, &string_hash_ops);
|
||||||
|
|
Loading…
Reference in a new issue