~cyphermox/network-manager/0.9.10.0

« back to all changes in this revision

Viewing changes to debian/patches/dns-dnsmasq-interface-and-dbus-path.patch

  • Committer: Mathieu Trudel-Lapierre
  • Date: 2014-11-11 19:07:43 UTC
  • Revision ID: mathieu-tl@ubuntu.com-20141111190743-s67xdxt6eafdm411
    - nm-change-dnsmasq-parameters.diff: Ubuntu-specific option choices for
      the local dnsmasq cache.
* Merged and renamed the dnsmasq DBus updates patches:
  debian/patches/dnsmasq-dbus-updates.patch,
  debian/patches/dns-dnsmasq-interface-and-dbus-path.patch:
  - 0001-dns-use-DBus-to-make-dnsmasq-nameserver-changes.patch: use DBus to
    push updates to dnsmasq rather than restarting it with a modified
    configuration file.
* Merged and renamed wifi ScanDone patches:
  debian/patches/scan_done_signal.patch,
  debian/patches/remove-extra-scan_done-on-scan-start.patch,
  debian/patches/cull_aps_on_scan_done_signal.patch:
  - 0001-wifi-Signal-on-the-wifi-device-when-its-supplicant-i.patch: send
    a ScanDone signal out on DBus to let applications know a requested scan
    operation has completed.
  - 0002-wifi-cull-the-scan-list-before-signalling-ScanDone-b.patch: cull
    the scan results just before sending the ScanDone signal, so the scan
    results are as up-to-date as possible.
* debian/patches/monotonic_timestamp_as_boottime.patch: provide a way to
  convert the NM generated monotonic timestamp to a CLOCK_BOOTTIME value, as
  suggested in upstream review of the last_seen patches.
* Merged and renamed the wifi last_seen timestamp patches:
  debian/patches/ap_publish_last_seen.patch,
  debian/patches/scan_update_last_seen.patch:
  - 0002-wifi-expose-the-last_seen-property-for-a-NMAccessPoi.patch:
    publish last-seen timestamp for wireless accesspoints on DBus.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
---
2
 
 src/dns-manager/nm-dns-dnsmasq.c        |    8 ++++----
3
 
 src/dns-manager/nm-dns-manager.c        |    6 +++---
4
 
 src/org.freedesktop.NetworkManager.conf |   10 ++++++++++
5
 
 3 files changed, 17 insertions(+), 7 deletions(-)
6
 
 
7
 
Index: b/src/dns-manager/nm-dns-dnsmasq.c
8
 
===================================================================
9
 
--- a/src/dns-manager/nm-dns-dnsmasq.c
10
 
+++ b/src/dns-manager/nm-dns-dnsmasq.c
11
 
@@ -49,7 +49,7 @@ G_DEFINE_TYPE (NMDnsDnsmasq, nm_dns_dnsm
12
 
 #define CONFFILE NMRUNDIR "/dnsmasq.conf"
13
 
 #define CONFDIR NMCONFDIR "/dnsmasq.d"
14
 
 
15
 
-#define DNSMASQ_DBUS_SERVICE "uk.org.thekelleys.dnsmasq"
16
 
+#define DNSMASQ_DBUS_SERVICE "org.freedesktop.NetworkManager.dnsmasq"
17
 
 #define DNSMASQ_DBUS_PATH "/uk/org/thekelleys/dnsmasq"
18
 
 #define DNSMASQ_DBUS_INTERFACE "uk.org.thekelleys.dnsmasq"
19
 
 
20
 
@@ -286,11 +286,11 @@ start_dnsmasq (NMDnsDnsmasq *self)
21
 
        argv[idx++] = "--no-hosts"; /* don't use /etc/hosts to resolve */
22
 
        argv[idx++] = "--bind-interfaces";
23
 
        argv[idx++] = "--pid-file=" PIDFILE;
24
 
-       argv[idx++] = "--listen-address=127.0.0.1"; /* Should work for both 4 and 6 */
25
 
+       argv[idx++] = "--listen-address=127.0.1.1"; /* Should work for both 4 and 6 */
26
 
        argv[idx++] = "--conf-file=" CONFFILE;
27
 
        argv[idx++] = "--cache-size=0";
28
 
        argv[idx++] = "--proxy-dnssec"; /* Allow DNSSEC to pass through */
29
 
-       argv[idx++] = "--enable-dbus";
30
 
+       argv[idx++] = "--enable-dbus=" DNSMASQ_DBUS_SERVICE;
31
 
 
32
 
        /* dnsmasq exits if the conf dir is not present */
33
 
        if (g_file_test (CONFDIR, G_FILE_TEST_IS_DIR))
34
 
@@ -411,7 +411,7 @@ update (NMDnsPlugin *plugin,
35
 
 
36
 
        /* If all the configs lists are empty, there is just nothing to be caching --
37
 
         * we cleared up the dnsmasq cache; but we should also fail the update, so
38
 
-        * that we don't write 127.0.0.1 to resolv.conf.
39
 
+        * that we don't write 127.0.1.1 to resolv.conf.
40
 
         */
41
 
        if (((vpn_configs && g_slist_length (vpn_configs) < 1) || !vpn_configs) &&
42
 
            ((dev_configs && g_slist_length (dev_configs) < 1) || !dev_configs) &&
43
 
Index: b/src/dns-manager/nm-dns-manager.c
44
 
===================================================================
45
 
--- a/src/dns-manager/nm-dns-manager.c
46
 
+++ b/src/dns-manager/nm-dns-manager.c
47
 
@@ -741,7 +741,7 @@ update_dns (NMDnsManager *self,
48
 
        g_slist_free (dev_configs);
49
 
        g_slist_free (other_configs);
50
 
 
51
 
-       /* If caching was successful, we only send 127.0.0.1 to /etc/resolv.conf
52
 
+       /* If caching was successful, we only send 127.0.1.1 to /etc/resolv.conf
53
 
         * to ensure that the glibc resolver doesn't try to round-robin nameservers,
54
 
         * but only uses the local caching nameserver.
55
 
         */
56
 
@@ -749,7 +749,7 @@ update_dns (NMDnsManager *self,
57
 
                if (nameservers)
58
 
                        g_strfreev (nameservers);
59
 
                nameservers = g_new0 (char*, 2);
60
 
-               nameservers[0] = g_strdup ("127.0.0.1");
61
 
+               nameservers[0] = g_strdup ("127.0.1.1");
62
 
        }
63
 
 
64
 
 #ifdef RESOLVCONF_PATH
65
 
@@ -1162,7 +1162,7 @@ dispose (GObject *object)
66
 
        g_clear_object (&priv->plugin);
67
 
 
68
 
        /* If we're quitting, leave a valid resolv.conf in place, not one
69
 
-        * pointing to 127.0.0.1 if any plugins were active.  Thus update
70
 
+        * pointing to 127.0.1.1 if any plugins were active.  Thus update
71
 
         * DNS after disposing of all plugins.  But if we haven't done any
72
 
         * DNS updates yet, there's no reason to touch resolv.conf on shutdown.
73
 
         */
74
 
Index: b/src/org.freedesktop.NetworkManager.conf
75
 
===================================================================
76
 
--- a/src/org.freedesktop.NetworkManager.conf
77
 
+++ b/src/org.freedesktop.NetworkManager.conf
78
 
@@ -25,6 +25,13 @@
79
 
                 <allow send_destination="org.freedesktop.NetworkManager.vpnc"/>
80
 
                 <allow send_destination="org.freedesktop.NetworkManager.ssh"/>
81
 
                 <allow send_destination="org.freedesktop.NetworkManager.iodine"/>
82
 
+
83
 
+                <!-- Allow the custom name for the dnsmasq instance spawned by NM
84
 
+                     from the dns dnsmasq plugin to own it's dbus name, and for
85
 
+                     messages to be sent to it.
86
 
+                 -->
87
 
+                <allow own="org.freedesktop.NetworkManager.dnsmasq"/>
88
 
+                <allow send_destination="org.freedesktop.NetworkManager.dnsmasq"/>
89
 
         </policy>
90
 
         <policy user="whoopsie">
91
 
                 <allow send_destination="org.freedesktop.NetworkManager"/>
92
 
@@ -137,6 +144,9 @@
93
 
                 <deny send_interface="org.freedesktop.NetworkManager.Settings" send_member="ReloadConnections"/>
94
 
                 <deny send_interface="org.freedesktop.NetworkManager.VPN.Plugin"/>
95
 
                 <deny send_interface="org.freedesktop.NetworkManager.PPP"/>
96
 
+
97
 
+                <deny own="org.freedesktop.NetworkManager.dnsmasq"/>
98
 
+                <deny send_destination="org.freedesktop.NetworkManager.dnsmasq"/>
99
 
         </policy>
100
 
 </busconfig>
101