diff options
author | Thomas Haller <thaller@redhat.com> | 2018-10-24 08:43:45 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-11-01 11:17:12 +0100 |
commit | b9eb264efe6dec856d5e30f0c48a62017bad1466 (patch) | |
tree | 5aba3088fa2f3e8f685b59510f08b6af7077b5df /man/NetworkManager.conf.xml | |
parent | 35cecd32fd9c27f67d3151247692d0d38185f149 (diff) | |
download | NetworkManager-b9eb264efe6dec856d5e30f0c48a62017bad1466.tar.gz |
device: add "dhcp-plugin" match spec for device
The need for this is the following:
"ipv4.dhcp-client-id" can be specified via global connection defaults.
In absence of any configuration in NetworkManager, the default depends
on the DHCP client plugin. In case of "dhclient", the default further
depends on /etc/dhcp.
For "internal" plugin, we may very well want to change the default
client-id to "mac" by universally installing a configuration
snippet
[connection-use-mac-client-id]
ipv4.dhcp-client-id=mac
However, if we the user happens to enable "dhclient" plugin, this also
forces the client-id and overrules configuration from /etc/dhcp. The real
problem is, that dhclient can be configured via means outside of NetworkManager,
so our defaults shall not overwrite defaults from /etc/dhcp.
With the new device spec, we can avoid this issue:
[connection-dhcp-client-id]
match-device=except:dhcp-plugin:dhclient
ipv4.dhcp-client-id=mac
This will be part of the solution for rh#1640494. Note that merely
dropping a configuration snippet is not yet enough. More fixes for
DHCP will follow. Also, bug rh#1640494 may have alternative solutions
as well. The nice part of this new feature is that it is generally
useful for configuring connection defaults and not specifically for
the client-id issue.
Note that this match spec is per-device, although the plugin is selected
globally. That makes some sense, because in the future we may or may not
configure the DHCP plugin per-device or per address family.
https://bugzilla.redhat.com/show_bug.cgi?id=1640494
Diffstat (limited to 'man/NetworkManager.conf.xml')
-rw-r--r-- | man/NetworkManager.conf.xml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml index 8773e6e916..b277db0d4e 100644 --- a/man/NetworkManager.conf.xml +++ b/man/NetworkManager.conf.xml @@ -1366,6 +1366,11 @@ enable=nm-version-min:1.3,nm-version-min:1.2.6,nm-version-min:1.0.16 </para></listitem> </varlistentry> <varlistentry> + <term>dhcp-plugin:DHCP</term> + <listitem><para>Match the configured DHCP plugin "<literal>main.dhcp</literal>". + </para></listitem> + </varlistentry> + <varlistentry> <term>except:SPEC</term> <listitem><para>Negative match of a device. <literal>SPEC</literal> must be explicitly qualified with a prefix such as <literal>interface-name:</literal>. A negative match has higher priority then the positive |