dns/resolved: set DoT server name (SNI) in systemd-resolved

Unfortunately, for this we require SetLinkDNSEx() API from v246.
That adds extra complexity.

If the configuration contains no server name, we continue using
SetLinkDNS(). Otherwise, at first we try using SetLinkDNSEx().
We will notice if that method is unsupported, reconfigure with
SetLinkDNS(), and set a flag to not try that again.
This commit is contained in:
Thomas Haller
2022-10-17 21:06:49 +02:00
parent ba33942734
commit d5be1c706e
4 changed files with 116 additions and 34 deletions

View File

@@ -36,6 +36,7 @@
/* define a variable, so that we can compare the operation with pointer equality. */ /* define a variable, so that we can compare the operation with pointer equality. */
static const char *const DBUS_OP_SET_LINK_DEFAULT_ROUTE = "SetLinkDefaultRoute"; static const char *const DBUS_OP_SET_LINK_DEFAULT_ROUTE = "SetLinkDefaultRoute";
static const char *const DBUS_OP_SET_LINK_DNS_OVER_TLS = "SetLinkDNSOverTLS"; static const char *const DBUS_OP_SET_LINK_DNS_OVER_TLS = "SetLinkDNSOverTLS";
static const char *const DBUS_OP_SET_LINK_DNS_EX = "SetLinkDNSEx";
/*****************************************************************************/ /*****************************************************************************/
@@ -90,12 +91,11 @@ typedef struct {
bool dbus_initied : 1; bool dbus_initied : 1;
bool send_updates_waiting : 1; bool send_updates_waiting : 1;
bool update_pending : 1; bool update_pending : 1;
/* These two variables ensure that the log is not spammed with
* API (not) supported messages. /* Detect support for the respective D-Bus API. */
* They can be removed when no distro uses systemd-resolved < v240 anymore
*/
NMTernary has_set_link_default_route : 3; NMTernary has_set_link_default_route : 3;
NMTernary has_set_link_dns_over_tls : 3; NMTernary has_set_link_dns_over_tls : 3;
NMTernary has_set_link_dns_ex : 3;
} NMDnsSystemdResolvedPrivate; } NMDnsSystemdResolvedPrivate;
struct _NMDnsSystemdResolved { struct _NMDnsSystemdResolved {
@@ -148,6 +148,8 @@ static void _resolve_complete_error(NMDnsSystemdResolvedResolveHandle *handle, G
static void _resolve_start(NMDnsSystemdResolved *self, NMDnsSystemdResolvedResolveHandle *handle); static void _resolve_start(NMDnsSystemdResolved *self, NMDnsSystemdResolvedResolveHandle *handle);
static void send_updates(NMDnsSystemdResolved *self);
/*****************************************************************************/ /*****************************************************************************/
static gboolean static gboolean
@@ -276,6 +278,7 @@ call_done(GObject *source, GAsyncResult *r, gpointer user_data)
NMLogLevel log_level; NMLogLevel log_level;
const char *operation; const char *operation;
int ifindex; int ifindex;
gboolean reconfigure = FALSE;
request_item = user_data; request_item = user_data;
self = request_item->self; self = request_item->self;
@@ -300,6 +303,11 @@ call_done(GObject *source, GAsyncResult *r, gpointer user_data)
priv->has_set_link_dns_over_tls = NM_TERNARY_TRUE; priv->has_set_link_dns_over_tls = NM_TERNARY_TRUE;
_LOGD("systemd-resolved support for SetLinkDNSOverTLS(): API supported"); _LOGD("systemd-resolved support for SetLinkDNSOverTLS(): API supported");
} }
} else if (operation == DBUS_OP_SET_LINK_DNS_EX) {
if (priv->has_set_link_dns_ex == NM_TERNARY_DEFAULT) {
priv->has_set_link_dns_ex = NM_TERNARY_TRUE;
_LOGD("systemd-resolved support for SetLinkDNSEx(): API supported");
}
} }
priv->send_updates_warn_ratelimited = FALSE; priv->send_updates_warn_ratelimited = FALSE;
goto out_dec_pending; goto out_dec_pending;
@@ -316,6 +324,21 @@ call_done(GObject *source, GAsyncResult *r, gpointer user_data)
priv->has_set_link_dns_over_tls = NM_TERNARY_FALSE; priv->has_set_link_dns_over_tls = NM_TERNARY_FALSE;
_LOGD("systemd-resolved support for SetLinkDNSOverTLS(): API not supported"); _LOGD("systemd-resolved support for SetLinkDNSOverTLS(): API not supported");
} }
} else if (operation == DBUS_OP_SET_LINK_DNS_EX) {
if (priv->has_set_link_dns_ex == NM_TERNARY_DEFAULT) {
priv->has_set_link_dns_ex = NM_TERNARY_FALSE;
_LOGD("systemd-resolved support for SetLinkDNSEx(): API not supported");
_LOGW("systemd-resolved does not support SetLinkDNSEx API (v246). "
"Cannot set DoT server name (SNI)");
/* We need to reconfigure with the SetLinkDNS fallback.
*
* In the other cases above, there is no need to reconfigure anything.
* We won't retry SetLinkDefaultRoute/SetLinkDNSOverTLS anymore, but there
* is nothing else we can do about that. */
reconfigure = TRUE;
}
} }
goto out_dec_pending; goto out_dec_pending;
} }
@@ -337,21 +360,29 @@ out_dec_pending:
* we must wrap up fast, and not hang an undefined amount time. */ * we must wrap up fast, and not hang an undefined amount time. */
g_object_unref(self); g_object_unref(self);
} }
if (reconfigure) {
priv->send_updates_waiting = TRUE;
send_updates(self);
}
} }
static gboolean static gboolean
update_add_ip_config(NMDnsSystemdResolved *self, update_add_ip_config(NMDnsSystemdResolved *self,
const NMDnsConfigIPData *ip_data,
GVariantBuilder *dns, GVariantBuilder *dns,
GVariantBuilder *dns_ex,
GVariantBuilder *domains, GVariantBuilder *domains,
const NMDnsConfigIPData *ip_data) gboolean *out_require_dns_ex)
{ {
gsize addr_size; NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE(self);
guint n; gsize addr_size;
guint i; guint n;
gboolean is_routing; guint i;
const char *domain; gboolean is_routing;
gboolean has_config = FALSE; const char *domain;
const char *const *strarr; gboolean has_config = FALSE;
const char *const *strarr;
addr_size = nm_utils_addr_family_to_size(ip_data->addr_family); addr_size = nm_utils_addr_family_to_size(ip_data->addr_family);
@@ -365,29 +396,50 @@ update_add_ip_config(NMDnsSystemdResolved *self,
strarr = nm_l3_config_data_get_nameservers(ip_data->l3cd, ip_data->addr_family, &n); strarr = nm_l3_config_data_get_nameservers(ip_data->l3cd, ip_data->addr_family, &n);
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
NMIPAddr a; const char *server_name;
NMIPAddr a;
if (!nm_utils_dnsname_parse_assert(ip_data->addr_family, strarr[i], NULL, &a, NULL)) if (!nm_utils_dnsname_parse_assert(ip_data->addr_family, strarr[i], NULL, &a, &server_name))
continue; continue;
g_variant_builder_open(dns, G_VARIANT_TYPE("(iay)")); if (server_name) {
g_variant_builder_add(dns, "i", ip_data->addr_family); NM_SET_OUT(out_require_dns_ex, TRUE);
g_variant_builder_add_value(dns, nm_g_variant_new_ay((gconstpointer) &a, addr_size)); if (priv->has_set_link_dns_ex == FALSE) {
g_variant_builder_close(dns); /* The caller won't care about this result anymore. We can skip setting it. */
dns = NULL;
}
}
if (dns_ex) {
g_variant_builder_open(dns_ex, G_VARIANT_TYPE("(iayqs)"));
g_variant_builder_add(dns_ex, "i", ip_data->addr_family);
g_variant_builder_add_value(dns_ex, nm_g_variant_new_ay((gconstpointer) &a, addr_size));
g_variant_builder_add(dns_ex, "q", 0);
g_variant_builder_add(dns_ex, "s", server_name ?: "");
g_variant_builder_close(dns_ex);
}
if (dns) {
g_variant_builder_open(dns, G_VARIANT_TYPE("(iay)"));
g_variant_builder_add(dns, "i", ip_data->addr_family);
g_variant_builder_add_value(dns, nm_g_variant_new_ay((gconstpointer) &a, addr_size));
g_variant_builder_close(dns);
}
has_config = TRUE; has_config = TRUE;
} }
if (!ip_data->domains.has_default_route_explicit if (!has_config || domains) {
&& ip_data->domains.has_default_route_exclusive) { if (!ip_data->domains.has_default_route_explicit
g_variant_builder_add(domains, "(sb)", ".", TRUE); && ip_data->domains.has_default_route_exclusive) {
has_config = TRUE; g_variant_builder_add(domains, "(sb)", ".", TRUE);
}
if (ip_data->domains.search) {
for (i = 0; ip_data->domains.search[i]; i++) {
domain = nm_utils_parse_dns_domain(ip_data->domains.search[i], &is_routing);
g_variant_builder_add(domains, "(sb)", domain[0] ? domain : ".", is_routing);
has_config = TRUE; has_config = TRUE;
} }
if (ip_data->domains.search) {
for (i = 0; ip_data->domains.search[i]; i++) {
domain = nm_utils_parse_dns_domain(ip_data->domains.search[i], &is_routing);
g_variant_builder_add(domains, "(sb)", domain[0] ? domain : ".", is_routing);
has_config = TRUE;
}
}
} }
return has_config; return has_config;
@@ -410,7 +462,9 @@ free_pending_updates(NMDnsSystemdResolved *self)
static gboolean static gboolean
prepare_one_interface(NMDnsSystemdResolved *self, const InterfaceConfig *ic) prepare_one_interface(NMDnsSystemdResolved *self, const InterfaceConfig *ic)
{ {
NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE(self);
GVariantBuilder dns; GVariantBuilder dns;
GVariantBuilder dns_ex;
GVariantBuilder domains; GVariantBuilder domains;
NMSettingConnectionMdns mdns = NM_SETTING_CONNECTION_MDNS_DEFAULT; NMSettingConnectionMdns mdns = NM_SETTING_CONNECTION_MDNS_DEFAULT;
NMSettingConnectionLlmnr llmnr = NM_SETTING_CONNECTION_LLMNR_DEFAULT; NMSettingConnectionLlmnr llmnr = NM_SETTING_CONNECTION_LLMNR_DEFAULT;
@@ -421,6 +475,7 @@ prepare_one_interface(NMDnsSystemdResolved *self, const InterfaceConfig *ic)
gboolean has_config = FALSE; gboolean has_config = FALSE;
gboolean has_default_route = FALSE; gboolean has_default_route = FALSE;
guint i; guint i;
gboolean require_dns_ex = FALSE;
g_variant_builder_init(&dns, G_VARIANT_TYPE("(ia(iay))")); g_variant_builder_init(&dns, G_VARIANT_TYPE("(ia(iay))"));
g_variant_builder_add(&dns, "i", ic->ifindex); g_variant_builder_add(&dns, "i", ic->ifindex);
@@ -434,7 +489,7 @@ prepare_one_interface(NMDnsSystemdResolved *self, const InterfaceConfig *ic)
for (i = 0; i < ic->ip_data_list->len; i++) { for (i = 0; i < ic->ip_data_list->len; i++) {
const NMDnsConfigIPData *ip_data = ic->ip_data_list->pdata[i]; const NMDnsConfigIPData *ip_data = ic->ip_data_list->pdata[i];
if (update_add_ip_config(self, &dns, &domains, ip_data)) if (update_add_ip_config(self, ip_data, &dns, NULL, &domains, &require_dns_ex))
has_config = TRUE; has_config = TRUE;
if (ip_data->domains.has_default_route) if (ip_data->domains.has_default_route)
@@ -452,6 +507,23 @@ prepare_one_interface(NMDnsSystemdResolved *self, const InterfaceConfig *ic)
g_variant_builder_close(&dns); g_variant_builder_close(&dns);
g_variant_builder_close(&domains); g_variant_builder_close(&domains);
if (!require_dns_ex) {
/* No need to use the new API. SetLinkDNS() is sufficient. */
} else if (!priv->has_set_link_dns_ex) {
/* API to set server name is not supported. Nothing we can do. */
require_dns_ex = FALSE;
} else {
g_variant_builder_init(&dns_ex, G_VARIANT_TYPE("(ia(iayqs))"));
g_variant_builder_add(&dns_ex, "i", ic->ifindex);
g_variant_builder_open(&dns_ex, G_VARIANT_TYPE("a(iayqs)"));
for (i = 0; i < ic->ip_data_list->len; i++) {
const NMDnsConfigIPData *ip_data = ic->ip_data_list->pdata[i];
update_add_ip_config(self, ip_data, NULL, &dns_ex, NULL, NULL);
}
g_variant_builder_close(&dns_ex);
}
switch (mdns) { switch (mdns) {
case NM_SETTING_CONNECTION_MDNS_NO: case NM_SETTING_CONNECTION_MDNS_NO:
mdns_arg = "no"; mdns_arg = "no";
@@ -517,7 +589,14 @@ prepare_one_interface(NMDnsSystemdResolved *self, const InterfaceConfig *ic)
"SetLinkLLMNR", "SetLinkLLMNR",
ic->ifindex, ic->ifindex,
g_variant_new("(is)", ic->ifindex, llmnr_arg ?: "")); g_variant_new("(is)", ic->ifindex, llmnr_arg ?: ""));
_request_item_append(self, "SetLinkDNS", ic->ifindex, g_variant_builder_end(&dns)); if (require_dns_ex) {
_request_item_append(self,
DBUS_OP_SET_LINK_DNS_EX,
ic->ifindex,
g_variant_builder_end(&dns_ex));
g_variant_builder_clear(&dns);
} else
_request_item_append(self, "SetLinkDNS", ic->ifindex, g_variant_builder_end(&dns));
_request_item_append(self, _request_item_append(self,
DBUS_OP_SET_LINK_DNS_OVER_TLS, DBUS_OP_SET_LINK_DNS_OVER_TLS,
ic->ifindex, ic->ifindex,
@@ -804,6 +883,7 @@ name_owner_changed(NMDnsSystemdResolved *self, const char *owner)
} else { } else {
priv->has_set_link_default_route = NM_TERNARY_DEFAULT; priv->has_set_link_default_route = NM_TERNARY_DEFAULT;
priv->has_set_link_dns_over_tls = NM_TERNARY_DEFAULT; priv->has_set_link_dns_over_tls = NM_TERNARY_DEFAULT;
priv->has_set_link_dns_ex = NM_TERNARY_DEFAULT;
} }
send_updates(self); send_updates(self);
@@ -1164,6 +1244,7 @@ nm_dns_systemd_resolved_init(NMDnsSystemdResolved *self)
priv->has_set_link_default_route = NM_TERNARY_DEFAULT; priv->has_set_link_default_route = NM_TERNARY_DEFAULT;
priv->has_set_link_dns_over_tls = NM_TERNARY_DEFAULT; priv->has_set_link_dns_over_tls = NM_TERNARY_DEFAULT;
priv->has_set_link_dns_ex = NM_TERNARY_DEFAULT;
c_list_init(&priv->request_queue_lst_head); c_list_init(&priv->request_queue_lst_head);
c_list_init(&priv->handle_lst_head); c_list_init(&priv->handle_lst_head);

View File

@@ -6224,7 +6224,8 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
* Array of IP addresses of DNS servers. * Array of IP addresses of DNS servers.
* *
* For DoT (DNS over TLS), the SNI server name can be specified by appending * For DoT (DNS over TLS), the SNI server name can be specified by appending
* "#example.com" to the IP address of the DNS server. * "#example.com" to the IP address of the DNS server. This currently only has
* effect when using systemd-resolved.
**/ **/
obj_properties[PROP_DNS] = obj_properties[PROP_DNS] =
g_param_spec_boxed(NM_SETTING_IP_CONFIG_DNS, g_param_spec_boxed(NM_SETTING_IP_CONFIG_DNS,

View File

@@ -167,7 +167,7 @@
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME N_("If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the \"dhcp-hostname\" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent.") #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME N_("If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the \"dhcp-hostname\" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent.")
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_TIMEOUT N_("A timeout for a DHCP transaction in seconds. If zero (the default), a globally configured default is used. If still unspecified, a device specific timeout is used (usually 45 seconds). Set to 2147483647 (MAXINT32) for infinity.") #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_TIMEOUT N_("A timeout for a DHCP transaction in seconds. If zero (the default), a globally configured default is used. If still unspecified, a device specific timeout is used (usually 45 seconds). Set to 2147483647 (MAXINT32) for infinity.")
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_VENDOR_CLASS_IDENTIFIER N_("The Vendor Class Identifier DHCP option (60). Special characters in the data string may be escaped using C-style escapes, nevertheless this property cannot contain nul bytes. If the per-profile value is unspecified (the default), a global connection default gets consulted. If still unspecified, the DHCP option is not sent to the server. Since 1.28") #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_VENDOR_CLASS_IDENTIFIER N_("The Vendor Class Identifier DHCP option (60). Special characters in the data string may be escaped using C-style escapes, nevertheless this property cannot contain nul bytes. If the per-profile value is unspecified (the default), a global connection default gets consulted. If still unspecified, the DHCP option is not sent to the server. Since 1.28")
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS N_("Array of IP addresses of DNS servers. For DoT (DNS over TLS), the SNI server name can be specified by appending \"#example.com\" to the IP address of the DNS server.") #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS N_("Array of IP addresses of DNS servers. For DoT (DNS over TLS), the SNI server name can be specified by appending \"#example.com\" to the IP address of the DNS server. This currently only has effect when using systemd-resolved.")
#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. The currently supported options are \"attempts\", \"debug\", \"edns0\", \"inet6\", \"ip6-bytestring\", \"ip6-dotint\", \"ndots\", \"no-check-names\", \"no-ip6-dotint\", \"no-reload\", \"no-tld-query\", \"rotate\", \"single-request\", \"single-request-reopen\", \"timeout\", \"trust-ad\", \"use-vc\". The \"trust-ad\" setting is only honored if the profile contributes name servers to resolv.conf, and if all contributing profiles have \"trust-ad\" enabled. When using a caching DNS plugin (dnsmasq or systemd-resolved in NetworkManager.conf) then \"edns0\" and \"trust-ad\" are automatically added.") #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. The currently supported options are \"attempts\", \"debug\", \"edns0\", \"inet6\", \"ip6-bytestring\", \"ip6-dotint\", \"ndots\", \"no-check-names\", \"no-ip6-dotint\", \"no-reload\", \"no-tld-query\", \"rotate\", \"single-request\", \"single-request-reopen\", \"timeout\", \"trust-ad\", \"use-vc\". The \"trust-ad\" setting is only honored if the profile contributes name servers to resolv.conf, and if all contributing profiles have \"trust-ad\" enabled. When using a caching DNS plugin (dnsmasq or systemd-resolved in NetworkManager.conf) then \"edns0\" and \"trust-ad\" are automatically added.")
#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 numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) 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 multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. 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. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the \"rotate\" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. 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 best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.") #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 numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) 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 multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. 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. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the \"rotate\" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. 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 best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.")
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_SEARCH N_("List 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. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting. When set on a profile that also enabled DHCP, the DNS search list received automatically (option 119 for DHCPv4 and option 24 for DHCPv6) gets merged with the manual list. This can be prevented by setting \"ignore-auto-dns\". Note that if no DNS searches are configured, the fallback will be derived from the domain from DHCP (option 15).") #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_SEARCH N_("List 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. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting. When set on a profile that also enabled DHCP, the DNS search list received automatically (option 119 for DHCPv4 and option 24 for DHCPv6) gets merged with the manual list. This can be prevented by setting \"ignore-auto-dns\". Note that if no DNS searches are configured, the fallback will be derived from the domain from DHCP (option 15).")
@@ -193,7 +193,7 @@
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_REJECT_SERVERS N_("Array of servers from which DHCP offers must be rejected. This property is useful to avoid getting a lease from misconfigured or rogue servers. For DHCPv4, each element must be an IPv4 address, optionally followed by a slash and a prefix length (e.g. \"192.168.122.0/24\"). This property is currently not implemented for DHCPv6.") #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_REJECT_SERVERS N_("Array of servers from which DHCP offers must be rejected. This property is useful to avoid getting a lease from misconfigured or rogue servers. For DHCPv4, each element must be an IPv4 address, optionally followed by a slash and a prefix length (e.g. \"192.168.122.0/24\"). This property is currently not implemented for DHCPv6.")
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_SEND_HOSTNAME N_("If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the \"dhcp-hostname\" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent.") #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_SEND_HOSTNAME N_("If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the \"dhcp-hostname\" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent.")
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_TIMEOUT N_("A timeout for a DHCP transaction in seconds. If zero (the default), a globally configured default is used. If still unspecified, a device specific timeout is used (usually 45 seconds). Set to 2147483647 (MAXINT32) for infinity.") #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_TIMEOUT N_("A timeout for a DHCP transaction in seconds. If zero (the default), a globally configured default is used. If still unspecified, a device specific timeout is used (usually 45 seconds). Set to 2147483647 (MAXINT32) for infinity.")
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS N_("Array of IP addresses of DNS servers. For DoT (DNS over TLS), the SNI server name can be specified by appending \"#example.com\" to the IP address of the DNS server.") #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS N_("Array of IP addresses of DNS servers. For DoT (DNS over TLS), the SNI server name can be specified by appending \"#example.com\" to the IP address of the DNS server. This currently only has effect when using systemd-resolved.")
#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. The currently supported options are \"attempts\", \"debug\", \"edns0\", \"inet6\", \"ip6-bytestring\", \"ip6-dotint\", \"ndots\", \"no-check-names\", \"no-ip6-dotint\", \"no-reload\", \"no-tld-query\", \"rotate\", \"single-request\", \"single-request-reopen\", \"timeout\", \"trust-ad\", \"use-vc\". The \"trust-ad\" setting is only honored if the profile contributes name servers to resolv.conf, and if all contributing profiles have \"trust-ad\" enabled. When using a caching DNS plugin (dnsmasq or systemd-resolved in NetworkManager.conf) then \"edns0\" and \"trust-ad\" are automatically added.") #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. The currently supported options are \"attempts\", \"debug\", \"edns0\", \"inet6\", \"ip6-bytestring\", \"ip6-dotint\", \"ndots\", \"no-check-names\", \"no-ip6-dotint\", \"no-reload\", \"no-tld-query\", \"rotate\", \"single-request\", \"single-request-reopen\", \"timeout\", \"trust-ad\", \"use-vc\". The \"trust-ad\" setting is only honored if the profile contributes name servers to resolv.conf, and if all contributing profiles have \"trust-ad\" enabled. When using a caching DNS plugin (dnsmasq or systemd-resolved in NetworkManager.conf) then \"edns0\" and \"trust-ad\" are automatically added.")
#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 numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) 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 multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. 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. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the \"rotate\" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. 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 best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.") #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 numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) 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 multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. 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. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the \"rotate\" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. 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 best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.")
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_SEARCH N_("List 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. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting. When set on a profile that also enabled DHCP, the DNS search list received automatically (option 119 for DHCPv4 and option 24 for DHCPv6) gets merged with the manual list. This can be prevented by setting \"ignore-auto-dns\". Note that if no DNS searches are configured, the fallback will be derived from the domain from DHCP (option 15).") #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_SEARCH N_("List 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. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting. When set on a profile that also enabled DHCP, the DNS search list received automatically (option 119 for DHCPv4 and option 24 for DHCPv6) gets merged with the manual list. This can be prevented by setting \"ignore-auto-dns\". Note that if no DNS searches are configured, the fallback will be derived from the domain from DHCP (option 15).")

View File

@@ -652,7 +652,7 @@
<property name="method" <property name="method"
description="IP configuration method. NMSettingIP4Config and NMSettingIP6Config both support &quot;disabled&quot;, &quot;auto&quot;, &quot;manual&quot;, and &quot;link-local&quot;. See the subclass-specific documentation for other values. In general, for the &quot;auto&quot; method, properties such as &quot;dns&quot; and &quot;routes&quot; specify information that is added on to the information returned from automatic configuration. The &quot;ignore-auto-routes&quot; and &quot;ignore-auto-dns&quot; properties modify this behavior. For methods that imply no upstream network, such as &quot;shared&quot; or &quot;link-local&quot;, these properties must be empty. For IPv4 method &quot;shared&quot;, the IP subnet can be configured by adding one manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the shared method must be configured on the interface which shares the internet to a subnet, not on the uplink which is shared." /> description="IP configuration method. NMSettingIP4Config and NMSettingIP6Config both support &quot;disabled&quot;, &quot;auto&quot;, &quot;manual&quot;, and &quot;link-local&quot;. See the subclass-specific documentation for other values. In general, for the &quot;auto&quot; method, properties such as &quot;dns&quot; and &quot;routes&quot; specify information that is added on to the information returned from automatic configuration. The &quot;ignore-auto-routes&quot; and &quot;ignore-auto-dns&quot; properties modify this behavior. For methods that imply no upstream network, such as &quot;shared&quot; or &quot;link-local&quot;, these properties must be empty. For IPv4 method &quot;shared&quot;, the IP subnet can be configured by adding one manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the shared method must be configured on the interface which shares the internet to a subnet, not on the uplink which is shared." />
<property name="dns" <property name="dns"
description="Array of IP addresses of DNS servers. For DoT (DNS over TLS), the SNI server name can be specified by appending &quot;#example.com&quot; to the IP address of the DNS server." /> description="Array of IP addresses of DNS servers. For DoT (DNS over TLS), the SNI server name can be specified by appending &quot;#example.com&quot; to the IP address of the DNS server. This currently only has effect when using systemd-resolved." />
<property name="dns-search" <property name="dns-search"
description="List of DNS search domains. Domains starting with a tilde (&apos;~&apos;) are considered &apos;routing&apos; 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. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting. When set on a profile that also enabled DHCP, the DNS search list received automatically (option 119 for DHCPv4 and option 24 for DHCPv6) gets merged with the manual list. This can be prevented by setting &quot;ignore-auto-dns&quot;. Note that if no DNS searches are configured, the fallback will be derived from the domain from DHCP (option 15)." /> description="List of DNS search domains. Domains starting with a tilde (&apos;~&apos;) are considered &apos;routing&apos; 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. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting. When set on a profile that also enabled DHCP, the DNS search list received automatically (option 119 for DHCPv4 and option 24 for DHCPv6) gets merged with the manual list. This can be prevented by setting &quot;ignore-auto-dns&quot;. Note that if no DNS searches are configured, the fallback will be derived from the domain from DHCP (option 15)." />
<property name="dns-options" <property name="dns-options"
@@ -709,7 +709,7 @@
<property name="method" <property name="method"
description="IP configuration method. NMSettingIP4Config and NMSettingIP6Config both support &quot;disabled&quot;, &quot;auto&quot;, &quot;manual&quot;, and &quot;link-local&quot;. See the subclass-specific documentation for other values. In general, for the &quot;auto&quot; method, properties such as &quot;dns&quot; and &quot;routes&quot; specify information that is added on to the information returned from automatic configuration. The &quot;ignore-auto-routes&quot; and &quot;ignore-auto-dns&quot; properties modify this behavior. For methods that imply no upstream network, such as &quot;shared&quot; or &quot;link-local&quot;, these properties must be empty. For IPv4 method &quot;shared&quot;, the IP subnet can be configured by adding one manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the shared method must be configured on the interface which shares the internet to a subnet, not on the uplink which is shared." /> description="IP configuration method. NMSettingIP4Config and NMSettingIP6Config both support &quot;disabled&quot;, &quot;auto&quot;, &quot;manual&quot;, and &quot;link-local&quot;. See the subclass-specific documentation for other values. In general, for the &quot;auto&quot; method, properties such as &quot;dns&quot; and &quot;routes&quot; specify information that is added on to the information returned from automatic configuration. The &quot;ignore-auto-routes&quot; and &quot;ignore-auto-dns&quot; properties modify this behavior. For methods that imply no upstream network, such as &quot;shared&quot; or &quot;link-local&quot;, these properties must be empty. For IPv4 method &quot;shared&quot;, the IP subnet can be configured by adding one manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the shared method must be configured on the interface which shares the internet to a subnet, not on the uplink which is shared." />
<property name="dns" <property name="dns"
description="Array of IP addresses of DNS servers. For DoT (DNS over TLS), the SNI server name can be specified by appending &quot;#example.com&quot; to the IP address of the DNS server." /> description="Array of IP addresses of DNS servers. For DoT (DNS over TLS), the SNI server name can be specified by appending &quot;#example.com&quot; to the IP address of the DNS server. This currently only has effect when using systemd-resolved." />
<property name="dns-search" <property name="dns-search"
description="List of DNS search domains. Domains starting with a tilde (&apos;~&apos;) are considered &apos;routing&apos; 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. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting. When set on a profile that also enabled DHCP, the DNS search list received automatically (option 119 for DHCPv4 and option 24 for DHCPv6) gets merged with the manual list. This can be prevented by setting &quot;ignore-auto-dns&quot;. Note that if no DNS searches are configured, the fallback will be derived from the domain from DHCP (option 15)." /> description="List of DNS search domains. Domains starting with a tilde (&apos;~&apos;) are considered &apos;routing&apos; 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. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting. When set on a profile that also enabled DHCP, the DNS search list received automatically (option 119 for DHCPv4 and option 24 for DHCPv6) gets merged with the manual list. This can be prevented by setting &quot;ignore-auto-dns&quot;. Note that if no DNS searches are configured, the fallback will be derived from the domain from DHCP (option 15)." />
<property name="dns-options" <property name="dns-options"