summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2018-03-23 18:50:36 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2018-10-19 18:39:34 +0200
commit107c7f27af1a754cb94f65857d2e85f09cc50743 (patch)
treed0807a3b3cda46178c9de46fb9dcb8dd4b7276f6
parent4e9555699d8ec3263b19dc2c8c1bb1d8d945b65b (diff)
downloadNetworkManager-107c7f27af1a754cb94f65857d2e85f09cc50743.tar.gz
libnm-core: document dns priority
(cherry picked from commit 1fbadecdbc00f3a61afe98790e5a21e6cb9b7933)
-rw-r--r--clients/common/settings-docs.c.in4
-rw-r--r--libnm-core/nm-setting-ip-config.c42
2 files changed, 28 insertions, 18 deletions
diff --git a/clients/common/settings-docs.c.in b/clients/common/settings-docs.c.in
index da1f24fa64..0abe983dde 100644
--- a/clients/common/settings-docs.c.in
+++ b/clients/common/settings-docs.c.in
@@ -216,7 +216,7 @@
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_TIMEOUT N_("A timeout for a DHCP transaction in seconds.")
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS N_("Array of IP addresses of DNS servers.")
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_OPTIONS N_("Array of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties.")
-#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_PRIORITY N_("Intra-connection DNS priority. The relative priority to be used when determining the order of DNS servers in resolv.conf. A lower value means that servers will be on top of the file. Zero selects the default value, which is 50 for VPNs and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. For that, just specify the DNS servers in the desired order. When multiple devices have configurations with the same priority, the one with an active default route will be preferred. Note that when using dns=dnsmasq the order is meaningless since dnsmasq forwards queries to all known servers at the same time. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least a negative priority, only DNS servers from connections with the lowest priority value will be used.")
+#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_PRIORITY N_("DNS servers priority. The relative priority for DNS servers specified by this setting. A lower value is better (higher priority). Zero selects the default value, which is 50 for VPNs and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. When multiple devices have configurations with the same priority, the one with an active default route will be preferred. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least a negative priority, only DNS servers from connections with the lowest priority value will be used. When using a DNS resolver that supports split-DNS as dns=dnsmasq or dns=systemd-resolved, each connection is used to query domains in its search list. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the highest priority (lowest numerical value) wins. If a connection specifies a domain which is subdomain of another domain with a negative DNS priority value, the subdomain is ignored.")
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_SEARCH N_("Array of DNS search domains. Domains starting with a tilde ('~') are considered 'routing' domains and are used only to decide the interface over which a query must be forwarded; they are not used to complete unqualified host names.")
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_GATEWAY N_("The gateway associated with this configuration. This is only meaningful if \"addresses\" is also set.")
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS N_("When \"method\" is set to \"auto\" and this property to TRUE, automatically configured nameservers and search domains are ignored and only nameservers and search domains specified in the \"dns\" and \"dns-search\" properties, if any, are used.")
@@ -236,7 +236,7 @@
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_TIMEOUT N_("A timeout for a DHCP transaction in seconds.")
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS N_("Array of IP addresses of DNS servers.")
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_OPTIONS N_("Array of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties.")
-#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_PRIORITY N_("Intra-connection DNS priority. The relative priority to be used when determining the order of DNS servers in resolv.conf. A lower value means that servers will be on top of the file. Zero selects the default value, which is 50 for VPNs and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. For that, just specify the DNS servers in the desired order. When multiple devices have configurations with the same priority, the one with an active default route will be preferred. Note that when using dns=dnsmasq the order is meaningless since dnsmasq forwards queries to all known servers at the same time. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least a negative priority, only DNS servers from connections with the lowest priority value will be used.")
+#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_PRIORITY N_("DNS servers priority. The relative priority for DNS servers specified by this setting. A lower value is better (higher priority). Zero selects the default value, which is 50 for VPNs and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. When multiple devices have configurations with the same priority, the one with an active default route will be preferred. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least a negative priority, only DNS servers from connections with the lowest priority value will be used. When using a DNS resolver that supports split-DNS as dns=dnsmasq or dns=systemd-resolved, each connection is used to query domains in its search list. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the highest priority (lowest numerical value) wins. If a connection specifies a domain which is subdomain of another domain with a negative DNS priority value, the subdomain is ignored.")
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_SEARCH N_("Array of DNS search domains. Domains starting with a tilde ('~') are considered 'routing' domains and are used only to decide the interface over which a query must be forwarded; they are not used to complete unqualified host names.")
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_GATEWAY N_("The gateway associated with this configuration. This is only meaningful if \"addresses\" is also set.")
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS N_("When \"method\" is set to \"auto\" and this property to TRUE, automatically configured nameservers and search domains are ignored and only nameservers and search domains specified in the \"dns\" and \"dns-search\" properties, if any, are used.")
diff --git a/libnm-core/nm-setting-ip-config.c b/libnm-core/nm-setting-ip-config.c
index 18d93f9deb..31da2dbe64 100644
--- a/libnm-core/nm-setting-ip-config.c
+++ b/libnm-core/nm-setting-ip-config.c
@@ -2993,24 +2993,34 @@ nm_setting_ip_config_class_init (NMSettingIPConfigClass *setting_class)
/**
* NMSettingIPConfig:dns-priority:
*
- * Intra-connection DNS priority.
+ * DNS servers priority.
*
- * The relative priority to be used when determining the order of DNS
- * servers in resolv.conf. A lower value means that servers will be on top
- * of the file. Zero selects the default value, which is 50 for VPNs and
- * 100 for other connections. Note that the priority is to order DNS
- * settings for multiple active connections. It does not disambiguate
- * multiple DNS servers within the same connection profile. For that,
- * just specify the DNS servers in the desired order.
- * When multiple devices have configurations with the same priority, the
- * one with an active default route will be preferred.
- * Note that when using dns=dnsmasq the order is meaningless
- * since dnsmasq forwards queries to all known servers at the same time.
+ * The relative priority for DNS servers specified by this setting. A lower
+ * value is better (higher priority). Zero selects the default value, which
+ * is 50 for VPNs and 100 for other connections.
*
- * Negative values have the special effect of excluding other configurations
- * with a greater priority value; so in presence of at least a negative
- * priority, only DNS servers from connections with the lowest priority
- * value will be used.
+ * Note that the priority is to order DNS settings for multiple active
+ * connections. It does not disambiguate multiple DNS servers within the
+ * same connection profile.
+ *
+ * When using dns=default, servers with higher priority will be on top of
+ * resolv.conf. To prioritize a given server over another one within the
+ * same connection, just specify them in the desired order. When multiple
+ * devices have configurations with the same priority, the one with an
+ * active default route will be preferred. Negative values have the special
+ * effect of excluding other configurations with a greater priority value;
+ * so in presence of at least a negative priority, only DNS servers from
+ * connections with the lowest priority value will be used.
+ *
+ * When using a DNS resolver that supports split-DNS as dns=dnsmasq or
+ * dns=systemd-resolved, each connection is used to query domains in its
+ * search list. Queries for domains not present in any search list are
+ * routed through connections having the '~.' special wildcard domain, which
+ * is added automatically to connections with the default route (or can be
+ * added manually). When multiple connections specify the same domain, the
+ * one with the highest priority (lowest numerical value) wins. If a
+ * connection specifies a domain which is subdomain of another domain with a
+ * negative DNS priority value, the subdomain is ignored.
*
* Since: 1.4
**/