diff options
Diffstat (limited to 'src/dns')
| -rw-r--r-- | src/dns/nm-dns-dnsmasq.c | 2 | ||||
| -rw-r--r-- | src/dns/nm-dns-manager.c | 10 | ||||
| -rw-r--r-- | src/dns/nm-dns-plugin.c | 4 | ||||
| -rw-r--r-- | src/dns/nm-dns-plugin.h | 2 | ||||
| -rw-r--r-- | src/dns/nm-dns-systemd-resolved.c | 28 | ||||
| -rw-r--r-- | src/dns/nm-dns-unbound.c | 2 |
6 files changed, 13 insertions, 35 deletions
diff --git a/src/dns/nm-dns-dnsmasq.c b/src/dns/nm-dns-dnsmasq.c index cb7a626c..91f4c55b 100644 --- a/src/dns/nm-dns-dnsmasq.c +++ b/src/dns/nm-dns-dnsmasq.c @@ -409,7 +409,7 @@ update (NMDnsPlugin *plugin, /*****************************************************************************/ static void -child_quit (NMDnsPlugin *plugin, int status) +child_quit (NMDnsPlugin *plugin, gint status) { NMDnsDnsmasq *self = NM_DNS_DNSMASQ (plugin); NMDnsDnsmasqPrivate *priv = NM_DNS_DNSMASQ_GET_PRIVATE (self); diff --git a/src/dns/nm-dns-manager.c b/src/dns/nm-dns-manager.c index 6a59b41c..a29fd81f 100644 --- a/src/dns/nm-dns-manager.c +++ b/src/dns/nm-dns-manager.c @@ -310,7 +310,7 @@ _config_data_free (NMDnsConfigData *data) g_slice_free (NMDnsConfigData, data); } -static int +static gint _ip_config_data_cmp (const NMDnsIPConfigData *a, const NMDnsIPConfigData *b) { int a_prio, b_prio; @@ -333,7 +333,7 @@ _ip_config_data_cmp (const NMDnsIPConfigData *a, const NMDnsIPConfigData *b) return 0; } -static int +static gint _ip_config_lst_cmp (const CList *a, const CList *b, const void *user_data) @@ -482,7 +482,7 @@ merge_one_ip_config (NMResolvConfData *rc, } static GPid -run_netconfig (NMDnsManager *self, GError **error, int *stdin_fd) +run_netconfig (NMDnsManager *self, GError **error, gint *stdin_fd) { char *argv[5]; gs_free char *tmp = NULL; @@ -533,7 +533,7 @@ dispatch_netconfig (NMDnsManager *self, GError **error) { GPid pid; - int fd; + gint fd; int status; gssize l; nm_auto_free_gstring GString *str = NULL; @@ -970,8 +970,6 @@ compute_hash (NMDnsManager *self, const NMGlobalDnsConfig *global, guint8 buffer else { const CList *head; - /* FIXME(ip-config-checksum): this relies on the fact that an IP - * configuration without DNS parameters gives a zero checksum. */ head = _ip_config_lst_head (self); c_list_for_each_entry (ip_data, head, ip_config_lst) nm_ip_config_hash (ip_data->ip_config, sum, TRUE); diff --git a/src/dns/nm-dns-plugin.c b/src/dns/nm-dns-plugin.c index 48f04b00..d9400e3e 100644 --- a/src/dns/nm-dns-plugin.c +++ b/src/dns/nm-dns-plugin.c @@ -124,7 +124,7 @@ _clear_pidfile (NMDnsPlugin *self) static void kill_existing (const char *progname, const char *pidfile, const char *kill_match) { - long pid; + glong pid; gs_free char *contents = NULL; gs_free char *cmdline_contents = NULL; guint64 start_time; @@ -167,7 +167,7 @@ out: } static void -watch_cb (GPid pid, int status, gpointer user_data) +watch_cb (GPid pid, gint status, gpointer user_data) { NMDnsPlugin *self = NM_DNS_PLUGIN (user_data); NMDnsPluginPrivate *priv = NM_DNS_PLUGIN_GET_PRIVATE (self); diff --git a/src/dns/nm-dns-plugin.h b/src/dns/nm-dns-plugin.h index 8a55921d..80b77d95 100644 --- a/src/dns/nm-dns-plugin.h +++ b/src/dns/nm-dns-plugin.h @@ -70,7 +70,7 @@ typedef struct { * by NMDnsManager. If the subclass decides the exit status (as returned * by waitpid(2)) is fatal it should then emit the 'failed' signal. */ - void (*child_quit) (NMDnsPlugin *self, int status); + void (*child_quit) (NMDnsPlugin *self, gint status); } NMDnsPluginClass; GType nm_dns_plugin_get_type (void); diff --git a/src/dns/nm-dns-systemd-resolved.c b/src/dns/nm-dns-systemd-resolved.c index 544f19c1..1a73aae1 100644 --- a/src/dns/nm-dns-systemd-resolved.c +++ b/src/dns/nm-dns-systemd-resolved.c @@ -65,6 +65,7 @@ typedef struct { GDBusProxy *resolve; GCancellable *init_cancellable; GCancellable *update_cancellable; + GCancellable *mdns_cancellable; CList request_queue_lst_head; } NMDnsSystemdResolvedPrivate; @@ -191,8 +192,7 @@ prepare_one_interface (NMDnsSystemdResolved *self, InterfaceConfig *ic) GVariantBuilder dns, domains; NMCListElem *elem; NMSettingConnectionMdns mdns = NM_SETTING_CONNECTION_MDNS_DEFAULT; - NMSettingConnectionLlmnr llmnr = NM_SETTING_CONNECTION_LLMNR_DEFAULT; - const char *mdns_arg = NULL, *llmnr_arg = NULL; + const char *mdns_arg = NULL; g_variant_builder_init (&dns, G_VARIANT_TYPE ("(ia(iay))")); g_variant_builder_add (&dns, "i", ic->ifindex); @@ -208,10 +208,8 @@ prepare_one_interface (NMDnsSystemdResolved *self, InterfaceConfig *ic) update_add_ip_config (self, &dns, &domains, data); - if (NM_IS_IP4_CONFIG (ip_config)) { + if (NM_IS_IP4_CONFIG (ip_config)) mdns = NM_MAX (mdns, nm_ip4_config_mdns_get (NM_IP4_CONFIG (ip_config))); - llmnr = NM_MAX (llmnr, nm_ip4_config_llmnr_get (NM_IP4_CONFIG (ip_config))); - } } g_variant_builder_close (&dns); @@ -233,22 +231,6 @@ prepare_one_interface (NMDnsSystemdResolved *self, InterfaceConfig *ic) } nm_assert (mdns_arg); - switch (llmnr) { - case NM_SETTING_CONNECTION_LLMNR_NO: - llmnr_arg = "no"; - break; - case NM_SETTING_CONNECTION_LLMNR_RESOLVE: - llmnr_arg = "resolve"; - break; - case NM_SETTING_CONNECTION_LLMNR_YES: - llmnr_arg = "yes"; - break; - case NM_SETTING_CONNECTION_LLMNR_DEFAULT: - llmnr_arg = ""; - break; - } - nm_assert (llmnr_arg); - _request_item_append (&priv->request_queue_lst_head, "SetLinkDNS", g_variant_builder_end (&dns)); @@ -258,9 +240,6 @@ prepare_one_interface (NMDnsSystemdResolved *self, InterfaceConfig *ic) _request_item_append (&priv->request_queue_lst_head, "SetLinkMulticastDNS", g_variant_new ("(is)", ic->ifindex, mdns_arg ?: "")); - _request_item_append (&priv->request_queue_lst_head, - "SetLinkLLMNR", - g_variant_new ("(is)", ic->ifindex, llmnr_arg ?: "")); } static void @@ -431,6 +410,7 @@ dispose (GObject *object) g_clear_object (&priv->resolve); nm_clear_g_cancellable (&priv->init_cancellable); nm_clear_g_cancellable (&priv->update_cancellable); + nm_clear_g_cancellable (&priv->mdns_cancellable); G_OBJECT_CLASS (nm_dns_systemd_resolved_parent_class)->dispose (object); } diff --git a/src/dns/nm-dns-unbound.c b/src/dns/nm-dns-unbound.c index b900f29e..e06128aa 100644 --- a/src/dns/nm-dns-unbound.c +++ b/src/dns/nm-dns-unbound.c @@ -43,7 +43,7 @@ update (NMDnsPlugin *plugin, const CList *ip_config_lst_head, const char *hostname) { - char *argv[] = { DNSSEC_TRIGGER_PATH, "--async", "--update", NULL }; + char *argv[] = { DNSSEC_TRIGGER_SCRIPT, "--async", "--update", NULL }; int status; /* TODO: We currently call a script installed with the dnssec-trigger |