summary refs log tree commit diff
path: root/src/dns/nm-dns-manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dns/nm-dns-manager.h')
-rw-r--r--src/dns/nm-dns-manager.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/dns/nm-dns-manager.h b/src/dns/nm-dns-manager.h
index f91d1556..fb2f36d2 100644
--- a/src/dns/nm-dns-manager.h
+++ b/src/dns/nm-dns-manager.h
@@ -22,7 +22,7 @@ typedef enum {
 
 enum {
     NM_DNS_PRIORITY_DEFAULT_NORMAL = 100,
-    NM_DNS_PRIORITY_DEFAULT_VPN    = -50,
+    NM_DNS_PRIORITY_DEFAULT_VPN    = 50,
 };
 
 struct _NMDnsConfigData;
@@ -37,13 +37,35 @@ typedef struct {
     struct {
         const char **search;
         char **      reverse;
+
+        /* Whether "search" explicitly contains a default route "~"
+         * or "". It is redundant information, but for faster lookup. */
+        bool has_default_route_explicit : 1;
+
+        /* Whether an explicit "~" search domain should be added.
+         * For systemd-resolved, this configured an explicit wildcard
+         * search domain, and should be used for profiles with negative
+         * DNS priority.
+         *
+         * If "has_default_route_explicit", this is always TRUE and implied.
+         *
+         * With systemd-resolved, if TRUE we will set a "." search domain.
+         */
+        bool has_default_route_exclusive : 1;
+
+        /* Whether the device should be used for any domains "~".
+         *
+         * If "has_default_route_exclusive", this is always TRUE and implied.
+         *
+         * With systemd-resolved, this is the value for SetLinkDefaultRoute(). */
+        bool has_default_route : 1;
     } domains;
 } NMDnsIPConfigData;
 
 typedef struct _NMDnsConfigData {
+    int                   ifindex;
     struct _NMDnsManager *self;
     CList                 data_lst_head;
-    int                   ifindex;
 } NMDnsConfigData;
 
 #define NM_TYPE_DNS_MANAGER (nm_dns_manager_get_type())