summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-12-10 16:39:44 +0100
committerThomas Haller <thaller@redhat.com>2019-12-10 16:49:23 +0100
commit3d07708f594ed5f164dfc6f8b04a376c762b8a48 (patch)
tree6d4b61a4e728de87d8da14586a1930b6ec3898ac
parenta5779595ce20a38401bfd2380c0a351628620d62 (diff)
downloadNetworkManager-3d07708f594ed5f164dfc6f8b04a376c762b8a48.tar.gz
doc: clarify default values for ipv4.mdns and ipv4.llmnr settings
LLMNR and mDNS settings can have their global default value configured in "NetworkManager.conf". Global default values should work the way that all regular values of the property can be configured explicitly in the connection profile. The special "default" value only indicates to allow lookup of the global default, but it should not have a meaning of its own. Note that if mDNS/LLMNR settings are left unspecified, we will set the argument to SetLinkMulticastDNS() and SetLinkLLMNR() functions to "", which means that systemd-resolved decides on a default. Also, depending on the DNS plugin, the default value differs. This is all fine however. In this case, the ultimate default value depends on other things (like the DNS plugin), but each possible value is in fact explicitly configurable. We also do that for "ipv6.ip6-privacy". Anyway, cleanup the documentation a bit and try to better explain what the default is.
-rw-r--r--clients/common/settings-docs.h.in4
-rw-r--r--libnm-core/nm-setting-connection.c27
-rw-r--r--man/NetworkManager.conf.xml2
3 files changed, 20 insertions, 13 deletions
diff --git a/clients/common/settings-docs.h.in b/clients/common/settings-docs.h.in
index 616b0c15d4..57e9ab2a48 100644
--- a/clients/common/settings-docs.h.in
+++ b/clients/common/settings-docs.h.in
@@ -140,9 +140,9 @@
#define DESCRIBE_DOC_NM_SETTING_CONNECTION_ID N_("A human readable unique identifier for the connection, like \"Work Wi-Fi\" or \"T-Mobile 3G\".")
#define DESCRIBE_DOC_NM_SETTING_CONNECTION_INTERFACE_NAME N_("The name of the network interface this connection is bound to. If not set, then the connection can be attached to any interface of the appropriate type (subject to restrictions imposed by other settings). For software devices this specifies the name of the created device. For connection types where interface names cannot easily be made persistent (e.g. mobile broadband or USB Ethernet), this property should not be used. Setting this property restricts the interfaces a connection can be used with, and if interface names change or are reordered the connection may be applied to the wrong interface.")
#define DESCRIBE_DOC_NM_SETTING_CONNECTION_LLDP N_("Whether LLDP is enabled for the connection.")
-#define DESCRIBE_DOC_NM_SETTING_CONNECTION_LLMNR N_("Whether Link-Local Multicast Name Resolution (LLMNR) is enabled for the connection. LLMNR is a protocol based on the Domain Name System (DNS) packet format that allows both IPv4 and IPv6 hosts to perform name resolution for hosts on the same local link. The permitted values are: yes: register hostname and resolving for the connection, no: disable LLMNR for the interface, resolve: do not register hostname but allow resolving of LLMNR host names. This feature requires a plugin which supports LLMNR. One such plugin is dns-systemd-resolved.")
+#define DESCRIBE_DOC_NM_SETTING_CONNECTION_LLMNR N_("Whether Link-Local Multicast Name Resolution (LLMNR) is enabled for the connection. LLMNR is a protocol based on the Domain Name System (DNS) packet format that allows both IPv4 and IPv6 hosts to perform name resolution for hosts on the same local link. The permitted values are: \"yes\" (2) register hostname and resolving for the connection, \"no\" (0) disable LLMNR for the interface, \"resolve\" (1) do not register hostname but allow resolving of LLMNR host names If unspecified, \"default\" ultimately depends on the DNS plugin (which for systemd-resolved currently means \"yes\"). This feature requires a plugin which supports LLMNR. Otherwise the setting has no effect. One such plugin is dns-systemd-resolved.")
#define DESCRIBE_DOC_NM_SETTING_CONNECTION_MASTER N_("Interface name of the master device or UUID of the master connection.")
-#define DESCRIBE_DOC_NM_SETTING_CONNECTION_MDNS N_("Whether mDNS is enabled for the connection. The permitted values are: yes: register hostname and resolving for the connection, no: disable mDNS for the interface, resolve: do not register hostname but allow resolving of mDNS host names. This feature requires a plugin which supports mDNS. One such plugin is dns-systemd-resolved.")
+#define DESCRIBE_DOC_NM_SETTING_CONNECTION_MDNS N_("Whether mDNS is enabled for the connection. The permitted values are: \"yes\" (2) register hostname and resolving for the connection, \"no\" (0) disable mDNS for the interface, \"resolve\" (1) do not register hostname but allow resolving of mDNS host names and \"default\" (-1) to allow lookup of a global default in NetworkManager.conf. If unspecified, \"default\" ultimately depends on the DNS plugin (which for systemd-resolved currently means \"no\"). This feature requires a plugin which supports mDNS. Otherwise the setting has no effect. One such plugin is dns-systemd-resolved.")
#define DESCRIBE_DOC_NM_SETTING_CONNECTION_METERED N_("Whether the connection is metered. When updating this property on a currently activated connection, the change takes effect immediately.")
#define DESCRIBE_DOC_NM_SETTING_CONNECTION_MULTI_CONNECT N_("Specifies whether the profile can be active multiple times at a particular moment. The value is of type NMConnectionMultiConnect.")
#define DESCRIBE_DOC_NM_SETTING_CONNECTION_PERMISSIONS N_("An array of strings defining what access a given user has to this connection. If this is NULL or empty, all users are allowed to access this connection; otherwise users are allowed if and only if they are in this list. When this is not empty, the connection can be active only when one of the specified users is logged into an active session. Each entry is of the form \"[type]:[id]:[reserved]\"; for example, \"user:dcbw:blah\". At this time only the \"user\" [type] is allowed. Any other values are ignored and reserved for future use. [id] is the username that this permission refers to, which may not contain the \":\" character. Any [reserved] information present must be ignored and is reserved for future use. All of [type], [id], and [reserved] must be valid UTF-8.")
diff --git a/libnm-core/nm-setting-connection.c b/libnm-core/nm-setting-connection.c
index a13e3f237a..ef33ecc138 100644
--- a/libnm-core/nm-setting-connection.c
+++ b/libnm-core/nm-setting-connection.c
@@ -2173,13 +2173,16 @@ nm_setting_connection_class_init (NMSettingConnectionClass *klass)
*
* Whether mDNS is enabled for the connection.
*
- * The permitted values are: yes: register hostname and resolving
- * for the connection, no: disable mDNS for the interface, resolve:
- * do not register hostname but allow resolving of mDNS host names.
- *
- * This feature requires a plugin which supports mDNS. One such
- * plugin is dns-systemd-resolved.
+ * The permitted values are: "yes" (2) register hostname and resolving
+ * for the connection, "no" (0) disable mDNS for the interface, "resolve"
+ * (1) do not register hostname but allow resolving of mDNS host names
+ * and "default" (-1) to allow lookup of a global default in NetworkManager.conf.
+ * If unspecified, "default" ultimately depends on the DNS plugin (which
+ * for systemd-resolved currently means "no").
*
+ * This feature requires a plugin which supports mDNS. Otherwise the
+ * setting has no effect. One such plugin is dns-systemd-resolved.
+*
* Since: 1.12
**/
/* ---ifcfg-rh---
@@ -2206,12 +2209,14 @@ nm_setting_connection_class_init (NMSettingConnectionClass *klass)
* System (DNS) packet format that allows both IPv4 and IPv6 hosts
* to perform name resolution for hosts on the same local link.
*
- * The permitted values are: yes: register hostname and resolving
- * for the connection, no: disable LLMNR for the interface, resolve:
- * do not register hostname but allow resolving of LLMNR host names.
+ * The permitted values are: "yes" (2) register hostname and resolving
+ * for the connection, "no" (0) disable LLMNR for the interface, "resolve"
+ * (1) do not register hostname but allow resolving of LLMNR host names
+ * If unspecified, "default" ultimately depends on the DNS plugin (which
+ * for systemd-resolved currently means "yes").
*
- * This feature requires a plugin which supports LLMNR. One such
- * plugin is dns-systemd-resolved.
+ * This feature requires a plugin which supports LLMNR. Otherwise the
+ * setting has no effect. One such plugin is dns-systemd-resolved.
*
* Since: 1.14
**/
diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml
index cdf55ed62e..c213d342b6 100644
--- a/man/NetworkManager.conf.xml
+++ b/man/NetworkManager.conf.xml
@@ -674,9 +674,11 @@ ipv6.ip6-privacy=0
</varlistentry>
<varlistentry>
<term><varname>connection.llmnr</varname></term>
+ <listitem><para>If unspecified, the ultimate default values depends on the DNS plugin. With systemd-resolved the default currently is "yes" (2) and for all other plugins "no" (0).</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>connection.mdns</varname></term>
+ <listitem><para>If unspecified, the ultimate default values depends on the DNS plugin. With systemd-resolved the default currently is "no" (0) and for all other plugins also "no" (0).</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>connection.stable-id</varname></term>