Merge lp:~awe/network-manager/update-1.2-touch into lp:~phablet-team/network-manager/touch-1.2

Proposed by Tony Espy
Status: Merged
Merged at revision: 1036
Proposed branch: lp:~awe/network-manager/update-1.2-touch
Merge into: lp:~phablet-team/network-manager/touch-1.2
Diff against target: 944 lines (+337/-207)
15 files modified
debian/changelog (+34/-6)
debian/control (+1/-1)
debian/indicator-network.pkla (+6/-0)
debian/libnm-dev.install (+2/-1)
debian/network-manager.install (+1/-2)
debian/network-manager.upstart (+24/-0)
debian/patches/clear-requested-scan-when-supplicant-goes-down.patch (+31/-0)
debian/patches/dbus-conf-add-sudo-for-indicator-network.patch (+30/-0)
debian/patches/ignore_rild_modem_devices.patch (+15/-13)
debian/patches/lp1099983_ignore-p2p-wifi-devices.patch (+18/-17)
debian/patches/lp1461593-add-modem-reconnect-delay-to-policy.patch (+52/-50)
debian/patches/series (+4/-1)
debian/patches/wifi-wpas-inactive.patch (+30/-0)
debian/patches/wwan-add-ofono-modem-support.patch (+67/-105)
debian/rules (+22/-11)
To merge this branch: bzr merge lp:~awe/network-manager/update-1.2-touch
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+292570@code.launchpad.net

Description of the change

This merge proposal backports the recent desktop/xenial landing of NM 1.2 to vivid for use on Touch.

Differences include:

 * bluez5 explicitly disabled ( DUN ! supported on Touch yet )

 * ppp disabled ( 2.4.7 needs to be backported )

 * systemd logging disabled

 * updates to ignore_device patches ( rild & p2p )

 * updates to wwan plugin NMModemOfono and NMModemManager classes

To post a comment you must log in.
1055. By Tony Espy

* Added d/p/wifi-wpas-inactive.patch: handle wpa_supplicant
  WiFi stall related to INACTIVE state.
* Added d/p/clear-requested-scan-when-supplicant-goes-down.patch:
  Clear scan_requested flag if supplicant released.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2016-04-07 21:09:58 +0000
+++ debian/changelog 2016-04-27 16:19:01 +0000
@@ -1,4 +1,4 @@
1network-manager (1.1.93-0ubuntu1) UNRELEASED; urgency=medium1network-manager (1.1.93-0ubuntu1~vivid1) vivid; urgency=medium
22
3 * New upstream release.3 * New upstream release.
4 * Resynchronize with Debian; remaining changes:4 * Resynchronize with Debian; remaining changes:
@@ -58,17 +58,45 @@
58 * Renamed 0001-wwan-add-support-for-using-oFono-as-a-modem-manager.patch58 * Renamed 0001-wwan-add-support-for-using-oFono-as-a-modem-manager.patch
59 to wwan-add-ofono-modem-support.patch as this patch needed to be59 to wwan-add-ofono-modem-support.patch as this patch needed to be
60 extensively re-worked due to dbus-glib being deprecated in NM1.2.60 extensively re-worked due to dbus-glib being deprecated in NM1.2.
61 * Remove upstreamed patches:61 * Removed upstreamed patches:
62 - tests-fix-bashism-in-run-test-dbus-session.sh.patch62 - tests-fix-bashism-in-run-test-dbus-session.sh.patch
63 - wifi-hack-for-wext-devices-reporting-IW_MODE_AUTO-configu.patch63 - wifi-hack-for-wext-devices-reporting-IW_MODE_AUTO-configu.patch
64 - lp1496434_warn_on_invalid_new_link.patch: alternate fix landed64 - lp1496434_warn_on_invalid_new_link.patch: alternate fix landed
65 upstream which ensures that a valid error instance is returned65 upstream which ensures that a valid error instance is returned
66 by the factory_create_link method.66 by the factory_create_link method.
67 * Update all symbols files.67 * Updated all symbols files.
68 * Rename ignore_rmnet_devices.path to ignore_rild_modem_devices.patch68 * Renamed ignore_rmnet_devices.path to ignore_rild_modem_devices.patch
69 * Restore wifi-Signal-on-the-wifi-device-when-its-supplicant-i.patch69 * Restored wifi-Signal-on-the-wifi-device-when-its-supplicant-i.patch
70 * Restored lp1461593-add-modem-reconnect-delay-to-policy.patch
71 * Updated d/control: temporarily remove ppp-dev till 2.4.7 backported.
72 * Updated d/rules:
73 - Temporarily disable gir, and ppp.
74 - Disable systemd-journal to restore syslog support.
75 - Fix dh_strip for vivid.
76 - Disable bluez5_dun support ( not supported on Touch yet ).
77 * Restored d/network-manager.upstart.
78 * Updated d/network-manager.install: disable install of pppd/*.
79 * Updated d/libnm-dev.install: disable install of gir/*.
80 * Added d/p/dbus-conf-add-sudo-for-indicator-network.patch: this patch
81 adds a 'sudo' policy group to allow indicator-network to use the
82 NetworkManager and NetworkManager.SecretAgent DBus interfaces.
83 * Added d/indicator-network.pkla, d/rules: install policy kit conf
84 file; this replaces a dirty hack in livecd-rootfs which created
85 this file on behalf of indicator-network.
86 * Updated d/p/wwan-add-ofono-modem-support.patch: fix MM and ofono
87 bus detection and MM restart logic so that NM doesn't keep trying
88 to start MM if it's not installed.
89 * Updated d/p/ignore_rild_modem_devices.patch: add 'rev_rmnet' (mako)
90 to list; also move filter logic before device creation.
91 * Updated d/p/lp1099983_ignore-p2p-wifi-devices.patch: move filter
92 logic before device creation.
93 * d/rules: add explicit --disable-bluez5 to configure.
94 * Added d/p/wifi-wpas-inactive.patch: handle wpa_supplicant
95 WiFi stall related to INACTIVE state.
96 * Added d/p/clear-requested-scan-when-supplicant-goes-down.patch:
97 Clear scan_requested flag if supplicant released.
7098
71 -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> Thu, 03 Mar 2016 15:51:48 -050099 -- Tony Espy <espy@canonical.com> Wed, 27 Apr 2016 12:17:48 -0500
72100
73network-manager (1.0.4-0ubuntu10) xenial; urgency=medium101network-manager (1.0.4-0ubuntu10) xenial; urgency=medium
74102
75103
=== modified file 'debian/control'
--- debian/control 2016-03-15 21:52:04 +0000
+++ debian/control 2016-04-27 16:19:01 +0000
@@ -16,7 +16,7 @@
16 libnl-3-dev (>= 3.2.8),16 libnl-3-dev (>= 3.2.8),
17 libnl-route-3-dev (>= 3.2.8),17 libnl-route-3-dev (>= 3.2.8),
18 libnl-genl-3-dev (>= 3.2.8),18 libnl-genl-3-dev (>= 3.2.8),
19 ppp-dev (>= 2.4.7-1+1),19 ppp-dev (>= 2.4.6),
20 libpolkit-gobject-1-dev,20 libpolkit-gobject-1-dev,
21 libpolkit-agent-1-dev (>= 0.97),21 libpolkit-agent-1-dev (>= 0.97),
22 libgnutls-dev,22 libgnutls-dev,
2323
=== added file 'debian/indicator-network.pkla'
--- debian/indicator-network.pkla 1970-01-01 00:00:00 +0000
+++ debian/indicator-network.pkla 2016-04-27 16:19:01 +0000
@@ -0,0 +1,6 @@
1[indicator-network-service]
2Identity=unix-group:sudo
3Action=org.freedesktop.NetworkManager.*
4ResultAny=yes
5ResultInactive=no
6ResultActive=yes
07
=== modified file 'debian/libnm-dev.install'
--- debian/libnm-dev.install 2015-08-20 09:47:16 +0000
+++ debian/libnm-dev.install 2016-04-27 16:19:01 +0000
@@ -2,4 +2,5 @@
2usr/lib/*/libnm.so2usr/lib/*/libnm.so
3usr/include/libnm/3usr/include/libnm/
4usr/share/gtk-doc/html/libnm/4usr/share/gtk-doc/html/libnm/
5usr/share/gir-1.0/NM-1.0.gir5# temporarily disabled for 1.2 landing:
6#usr/share/gir-1.0/NM-1.0.gir
67
=== modified file 'debian/network-manager.install'
--- debian/network-manager.install 2016-03-15 21:52:04 +0000
+++ debian/network-manager.install 2016-04-27 16:19:01 +0000
@@ -6,11 +6,10 @@
6usr/lib/NetworkManager/nm-iface-helper6usr/lib/NetworkManager/nm-iface-helper
7usr/lib/NetworkManager/nm-dispatcher7usr/lib/NetworkManager/nm-dispatcher
8usr/lib/*/NetworkManager/libnm-settings-plugin-ifupdown.so8usr/lib/*/NetworkManager/libnm-settings-plugin-ifupdown.so
9usr/lib/*/NetworkManager/libnm-settings-plugin-ibft.so
10usr/lib/*/NetworkManager/libnm-settings-plugin-ofono.so9usr/lib/*/NetworkManager/libnm-settings-plugin-ofono.so
11usr/lib/*/NetworkManager/libnm-device-plugin-*.so10usr/lib/*/NetworkManager/libnm-device-plugin-*.so
12usr/lib/*/NetworkManager/libnm-wwan.so11usr/lib/*/NetworkManager/libnm-wwan.so
13usr/lib/pppd/*/*.so12#usr/lib/pppd/*/*.so
14usr/share/doc/NetworkManager/examples/13usr/share/doc/NetworkManager/examples/
15usr/share/locale/14usr/share/locale/
16usr/share/man/15usr/share/man/
1716
=== added file 'debian/network-manager.upstart'
--- debian/network-manager.upstart 1970-01-01 00:00:00 +0000
+++ debian/network-manager.upstart 2016-04-27 16:19:01 +0000
@@ -0,0 +1,24 @@
1# network-manager - network connection manager
2#
3# The Network Manager daemon manages the system's network connections,
4# automatically switching between the best available.
5
6description "network connection manager"
7
8start on (local-filesystems
9 and started dbus
10 and static-network-up)
11stop on stopping dbus
12
13expect fork
14respawn
15
16script
17 # set $LANG so that messages appearing on the GUI will be translated. See LP: 875017
18 if [ -r /etc/default/locale ]; then
19 . /etc/default/locale
20 export LANG LANGUAGE LC_MESSAGES LC_ALL
21 fi
22
23 exec NetworkManager
24end script
025
=== added file 'debian/patches/clear-requested-scan-when-supplicant-goes-down.patch'
--- debian/patches/clear-requested-scan-when-supplicant-goes-down.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/clear-requested-scan-when-supplicant-goes-down.patch 2016-04-27 16:19:01 +0000
@@ -0,0 +1,31 @@
1---
2 src/devices/wifi/nm-device-wifi.c | 7 +++++++
3 1 file changed, 7 insertions(+)
4
5Index: network-manager-1.1.93/src/devices/wifi/nm-device-wifi.c
6===================================================================
7--- network-manager-1.1.93.orig/src/devices/wifi/nm-device-wifi.c
8+++ network-manager-1.1.93/src/devices/wifi/nm-device-wifi.c
9@@ -246,6 +246,13 @@ supplicant_interface_release (NMDeviceWi
10
11 priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
12
13+ if (priv->requested_scan) {
14+ nm_log_dbg (LOGD_WIFI_SCAN, "(%s): reset requested_scan flag to FALSE",
15+ nm_device_get_iface (NM_DEVICE (self)));
16+ priv->requested_scan = FALSE;
17+ nm_device_remove_pending_action (NM_DEVICE (self), "scan", TRUE);
18+ }
19+
20 nm_clear_g_source (&priv->pending_scan_id);
21
22 /* Reset the scan interval to be pretty frequent when disconnected */
23@@ -1915,7 +1922,7 @@ supplicant_iface_state_cb (NMSupplicantI
24 priv->requested_scan = FALSE;
25 }
26
27- cancel_pending_scan (self);
28+ nm_clear_g_source (&priv->pending_scan_id);
29 request_wireless_scan (self, NULL);
30 }
31 default:
032
=== added file 'debian/patches/dbus-conf-add-sudo-for-indicator-network.patch'
--- debian/patches/dbus-conf-add-sudo-for-indicator-network.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/dbus-conf-add-sudo-for-indicator-network.patch 2016-04-27 16:19:01 +0000
@@ -0,0 +1,30 @@
1Author: Tony Espy <espy@canonical.com>
2Subject: Add sudo policy to DBus conf for indicator-network
3
4This patch adds a 'sudo' group DBus policy to allow
5indicator-network to interact with the NetworkManager and
6NetworkManager.SecretAgent interfaces.
7
8This was previously handled by a dirty hack/hook in the
9livecd-rootfs tool used to build touch images.
10
11---
12 src/org.freedesktop.NetworkManager.conf | 5 +++++
13 1 file changed, 5 insertions(+)
14
15Index: b/src/org.freedesktop.NetworkManager.conf
16===================================================================
17--- a/src/org.freedesktop.NetworkManager.conf
18+++ b/src/org.freedesktop.NetworkManager.conf
19@@ -2,6 +2,11 @@
20 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
21 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
22 <busconfig>
23+ <policy group="sudo">
24+ <allow send_destination="org.freedesktop.NetworkManager"/>
25+ <allow send_interface="org.freedesktop.NetworkManager"/>
26+ <allow send_interface="org.freedesktop.NetworkManager.SecretAgent"/>
27+ </policy>
28 <policy user="root">
29 <allow own="org.freedesktop.NetworkManager"/>
30 <allow send_destination="org.freedesktop.NetworkManager"/>
031
=== modified file 'debian/patches/ignore_rild_modem_devices.patch'
--- debian/patches/ignore_rild_modem_devices.patch 2016-04-07 19:30:51 +0000
+++ debian/patches/ignore_rild_modem_devices.patch 2016-04-27 16:19:01 +0000
@@ -1,23 +1,25 @@
1From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>1From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2Subject: Ignore rmnet_usbX devices.2Subject: Ignore rmnet_usbX devices.
3---3---
4 src/nm-manager.c | 6 ++++++4 src/nm-manager.c | 8 ++++++++
5 1 file changed, 6 insertions(+)5 1 file changed, 8 insertions(+)
66
7Index: b/src/nm-manager.c7Index: b/src/nm-manager.c
8===================================================================8===================================================================
9--- a/src/nm-manager.c9--- a/src/nm-manager.c
10+++ b/src/nm-manager.c10+++ b/src/nm-manager.c
11@@ -2042,6 +2042,12 @@ platform_link_added (NMManager *self,11@@ -2078,6 +2078,14 @@ platform_link_added (NMManager *self,
12 }12 gboolean ignore = FALSE;
13 }13 gs_free_error GError *error = NULL;
14 14
15+ /* Ignore rmnet_usb devices, which will be handled by their modem parent15+ /* Ignore rild modem devices, which will be handled by their modem parent */
16+ */16+ if (g_strstr_len (plink->name, NM_STRLEN ("rmnet"), "rmnet") ||
17+ if (!strncmp (plink->name, "rmnet_usb", NM_STRLEN ("rmnet_usb")) ||17+ g_strstr_len (plink->name, NM_STRLEN ("rev_rmnet"), "rev_rmnet") ||
18+ !strncmp (plink->name, "ccmni", NM_STRLEN ("ccmni")))18+ g_strstr_len (plink->name, NM_STRLEN ("ccmni"), "ccmni")) {
19+ return;19+ _LOGW (LOGD_HW, "Ignoring rild modem device: %s", plink->name);
20+ return;
21+ }
20+22+
21 if (device == NULL) {23 device = nm_device_factory_create_device (factory, plink->name, plink, NULL, &ignore, &error);
22 switch (plink->type) {24 if (!device) {
23 case NM_LINK_TYPE_WWAN_ETHERNET:25 if (!ignore) {
2426
=== modified file 'debian/patches/lp1099983_ignore-p2p-wifi-devices.patch'
--- debian/patches/lp1099983_ignore-p2p-wifi-devices.patch 2016-03-03 22:47:33 +0000
+++ debian/patches/lp1099983_ignore-p2p-wifi-devices.patch 2016-04-27 16:19:01 +0000
@@ -2,27 +2,28 @@
2Subject: Ignore p2p0 wifi devices from android.2Subject: Ignore p2p0 wifi devices from android.
33
4---4---
5 src/nm-manager.c | 10 ++++++++++5 src/nm-manager.c | 11 +++++++++++
6 1 file changed, 10 insertions(+)6 1 file changed, 11 insertions(+)
77
8Index: b/src/nm-manager.c8Index: b/src/nm-manager.c
9===================================================================9===================================================================
10--- a/src/nm-manager.c10--- a/src/nm-manager.c
11+++ b/src/nm-manager.c11+++ b/src/nm-manager.c
12@@ -2048,6 +2048,16 @@ platform_link_added (NMManager *self,12@@ -2086,6 +2086,17 @@ platform_link_added (NMManager *self,
13 !strncmp (plink->name, "ccmni", NM_STRLEN ("ccmni")))13 return;
14 return;14 }
15 15
16+ /*16+ /*
17+ * Ubuntu: Explicitly unmanage p2p Wi-Fi devices exposed by Android JB Wi-Fi drivers.17+ * Ubuntu: Explicitly unmanage all p2p Wi-Fi devices which are
18+ */18+ * managed externally in the case of Wi-Fi Direct.
19+ NMDeviceType devtype = nm_device_get_device_type (device);19+ */
20+ if ((plink->type == NM_LINK_TYPE_WIFI)20+ NMDeviceType devtype = nm_device_get_device_type (device);
21+ && !strncmp (plink->name, "p2p0", NM_STRLEN ("p2p0"))) {21+ if ((plink->type == NM_LINK_TYPE_WIFI)
22+ nm_log_info (LOGD_HW, "(%s): ignoring P2P wireless iface", plink->name);22+ && g_strstr_len (plink->name, NM_STRLEN ("p2p"), "p2p")) {
23+ return;23+ nm_log_info (LOGD_HW, "(%s): ignoring P2P wireless iface", plink->name);
24+ }24+ return;
25+ }
25+26+
26 if (device == NULL) {27 device = nm_device_factory_create_device (factory, plink->name, plink, NULL, &ignore, &error);
27 switch (plink->type) {28 if (!device) {
28 case NM_LINK_TYPE_WWAN_ETHERNET:29 if (!ignore) {
2930
=== modified file 'debian/patches/lp1461593-add-modem-reconnect-delay-to-policy.patch'
--- debian/patches/lp1461593-add-modem-reconnect-delay-to-policy.patch 2016-03-03 22:47:33 +0000
+++ debian/patches/lp1461593-add-modem-reconnect-delay-to-policy.patch 2016-04-27 16:19:01 +0000
@@ -7,29 +7,26 @@
7timeout ( which defaults to 300s ).7timeout ( which defaults to 300s ).
88
9Bug: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/14615939Bug: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1461593
1010---
11---11 src/nm-policy.c | 34 +++++++++++++++++++++++++++-------
1212 1 file changed, 27 insertions(+), 7 deletions(-)
13---
14 src/nm-policy.c | 36 +++++++++++++++++++++++++++++-------
15 1 file changed, 29 insertions(+), 7 deletions(-)
1613
17Index: b/src/nm-policy.c14Index: b/src/nm-policy.c
18===================================================================15===================================================================
19--- a/src/nm-policy.c16--- a/src/nm-policy.c
20+++ b/src/nm-policy.c17+++ b/src/nm-policy.c
21@@ -901,7 +901,7 @@ sleeping_changed (NMManager *manager, GP18@@ -931,7 +931,7 @@ sleeping_changed (NMManager *manager, GP
22 }19 }
23 20
24 static void21 static void
25-schedule_activate_check (NMPolicy *policy, NMDevice *device)22-schedule_activate_check (NMPolicy *self, NMDevice *device)
26+schedule_activate_check (NMPolicy *policy, NMDevice *device, guint delay)23+schedule_activate_check (NMPolicy *self, NMDevice *device, guint delay)
27 {24 {
28 NMPolicyPrivate *priv = NM_POLICY_GET_PRIVATE (policy);25 NMPolicyPrivate *priv = NM_POLICY_GET_PRIVATE (self);
29 ActivateData *data;26 ActivateData *data;
30@@ -930,7 +930,12 @@ schedule_activate_check (NMPolicy *polic27@@ -960,7 +960,12 @@ schedule_activate_check (NMPolicy *self,
31 data = g_malloc0 (sizeof (ActivateData));28 data = g_slice_new0 (ActivateData);
32 data->policy = policy;29 data->policy = self;
33 data->device = g_object_ref (device);30 data->device = g_object_ref (device);
34- data->autoactivate_id = g_idle_add (auto_activate_device, data);31- data->autoactivate_id = g_idle_add (auto_activate_device, data);
35+32+
@@ -41,7 +38,7 @@
41 priv->pending_activation_checks = g_slist_append (priv->pending_activation_checks, data);38 priv->pending_activation_checks = g_slist_append (priv->pending_activation_checks, data);
42 }39 }
43 40
44@@ -1125,6 +1130,7 @@ device_state_changed (NMDevice *device,41@@ -1155,6 +1160,7 @@ device_state_changed (NMDevice *device,
45 NMIP4Config *ip4_config;42 NMIP4Config *ip4_config;
46 NMIP6Config *ip6_config;43 NMIP6Config *ip6_config;
47 NMSettingConnection *s_con = NULL;44 NMSettingConnection *s_con = NULL;
@@ -49,64 +46,69 @@
49 46
50 switch (new_state) {47 switch (new_state) {
51 case NM_DEVICE_STATE_FAILED:48 case NM_DEVICE_STATE_FAILED:
52@@ -1153,9 +1159,14 @@ device_state_changed (NMDevice *device,49@@ -1172,7 +1178,7 @@ device_state_changed (NMDevice *device,
50
51 nm_settings_connection_set_autoconnect_blocked_reason (connection, NM_DEVICE_STATE_REASON_NO_SECRETS);
52 } else if (tries > 0) {
53- _LOGD (LOGD_DEVICE, "connection '%s' failed to autoconnect; %d tries left",
54+ _LOGI (LOGD_DEVICE, "connection '%s' failed to autoconnect; %d tries left",
55 nm_settings_connection_get_id (connection), tries);
56 nm_settings_connection_set_autoconnect_retries (connection, tries - 1);
57 }
58@@ -1183,6 +1189,10 @@ device_state_changed (NMDevice *device,
53 /* Schedule a handler to reset retries count */59 /* Schedule a handler to reset retries count */
54 if (!priv->reset_retries_id) {60 if (!priv->reset_retries_id) {
55 gint32 retry_time = nm_settings_connection_get_autoconnect_retry_time (connection);61 gint32 retry_time = nm_settings_connection_get_autoconnect_retry_time (connection);
56+ gint32 actual_time = MAX (0, retry_time - nm_utils_get_monotonic_timestamp_s ());62+ gint32 actual_time = MAX (0, retry_time - nm_utils_get_monotonic_timestamp_s ());
57+63+
58+ nm_log_info (LOGD_DEVICE, "Disabling autoconnect for connection '%s'; setting retry of %d.",64+ _LOGI (LOGD_DEVICE, "Disabling autoconnect for connection '%s'; setting retry of %d.",
59+ nm_connection_get_id (NM_CONNECTION (connection)), actual_time);65+ nm_connection_get_id (NM_CONNECTION (connection)), actual_time);
60+
61 66
62 g_warn_if_fail (retry_time != 0);67 g_warn_if_fail (retry_time != 0);
63- priv->reset_retries_id = g_timeout_add_seconds (MAX (0, retry_time - nm_utils_get_monotonic_timestamp_s ()), reset_connections_retries, policy);68 priv->reset_retries_id = g_timeout_add_seconds (MAX (0, retry_time - nm_utils_get_monotonic_timestamp_s ()), reset_connections_retries, self);
64+ priv->reset_retries_id = g_timeout_add_seconds (actual_time, reset_connections_retries, policy);69@@ -1250,7 +1260,17 @@ device_state_changed (NMDevice *device,
65 }70 update_routing_and_dns (self, FALSE);
66 }
67 nm_connection_clear_secrets (NM_CONNECTION (connection));
68@@ -1220,7 +1231,18 @@ device_state_changed (NMDevice *device,
69 update_routing_and_dns (policy, FALSE);
70 71
71 /* Device is now available for auto-activation */72 /* Device is now available for auto-activation */
72- schedule_activate_check (policy, device);73- schedule_activate_check (self, device);
73+
74+ if (nm_device_get_device_type (device) == NM_DEVICE_TYPE_MODEM)74+ if (nm_device_get_device_type (device) == NM_DEVICE_TYPE_MODEM)
75+ delay = 5;75+ delay = 5;
76+76+
77+ if (connection)77+ if (connection)
78+ nm_log_info (LOGD_DEVICE, "Connection '%s' disconnected, scheduling activate_check in %u seconds.",78+ _LOGI (LOGD_DEVICE, "Connection '%s' disconnected, scheduling activate_check in %u seconds.",
79+ nm_connection_get_id (NM_CONNECTION (connection)), delay);79+ nm_connection_get_id (NM_CONNECTION (connection)), delay);
80+ else80+ else
81+ nm_log_info (LOGD_DEVICE, "Device '%s' has no connection; scheduling activate_check in %u seconds.",81+ _LOGI (LOGD_DEVICE, "Device '%s' has no connection; scheduling activate_check in %u seconds.",
82+ nm_device_get_iface (device), delay);82+ nm_device_get_iface (device), delay);
83+83+
84+ schedule_activate_check (policy, device, delay);84+ schedule_activate_check (self, device, delay);
85 break;85 break;
86 86
87 case NM_DEVICE_STATE_PREPARE:87 case NM_DEVICE_STATE_PREPARE:
88@@ -1330,13 +1352,13 @@ device_autoconnect_changed (NMDevice *de88@@ -1363,7 +1383,7 @@ device_autoconnect_changed (NMDevice *de
89 gpointer user_data)89 NMPolicy *self = priv->self;
90 {90
91 if (nm_device_autoconnect_allowed (device))91 if (nm_device_autoconnect_allowed (device))
92- schedule_activate_check ((NMPolicy *) user_data, device);92- schedule_activate_check (self, device);
93+ schedule_activate_check ((NMPolicy *) user_data, device, 0);93+ schedule_activate_check (self, device, 0);
94 }94 }
95 95
96 static void96 static void
97 device_recheck_auto_activate (NMDevice *device, gpointer user_data)97@@ -1372,7 +1392,7 @@ device_recheck_auto_activate (NMDevice *
98 {98 NMPolicyPrivate *priv = user_data;
99- schedule_activate_check (NM_POLICY (user_data), device);99 NMPolicy *self = priv->self;
100+ schedule_activate_check (NM_POLICY (user_data), device, 0);100
101 }101- schedule_activate_check (self, device);
102 102+ schedule_activate_check (self, device, 0);
103 typedef struct {103 }
104@@ -1561,7 +1583,7 @@ schedule_activate_all (NMPolicy *policy)104
105 static void
106@@ -1586,7 +1606,7 @@ schedule_activate_all (NMPolicy *self)
105 const GSList *iter;107 const GSList *iter;
106 108
107 for (iter = nm_manager_get_devices (priv->manager); iter; iter = g_slist_next (iter))109 for (iter = nm_manager_get_devices (priv->manager); iter; iter = g_slist_next (iter))
108- schedule_activate_check (policy, NM_DEVICE (iter->data));110- schedule_activate_check (self, NM_DEVICE (iter->data));
109+ schedule_activate_check (policy, NM_DEVICE (iter->data), 0);111+ schedule_activate_check (self, NM_DEVICE (iter->data), 0);
110 }112 }
111 113
112 static void114 static void
113115
=== modified file 'debian/patches/series'
--- debian/patches/series 2016-04-07 21:09:58 +0000
+++ debian/patches/series 2016-04-27 16:19:01 +0000
@@ -35,7 +35,7 @@
35wwan-add-ofono-modem-support.patch35wwan-add-ofono-modem-support.patch
36lp1461593-add-nm-settings-connection-reset-retries-methods.patch36lp1461593-add-nm-settings-connection-reset-retries-methods.patch
37add_ofono_settings_support.patch37add_ofono_settings_support.patch
38#lp1461593-add-modem-reconnect-delay-to-policy.patch38lp1461593-add-modem-reconnect-delay-to-policy.patch
39lp1445080-modify-device-modem-avail.patch39lp1445080-modify-device-modem-avail.patch
4040
41# killswitch41# killswitch
@@ -44,3 +44,6 @@
44# more fixes44# more fixes
45conditional_libteam_tests.patch45conditional_libteam_tests.patch
46disable_general_with_expect_test.patch46disable_general_with_expect_test.patch
47dbus-conf-add-sudo-for-indicator-network.patch
48wifi-wpas-inactive.patch
49clear-requested-scan-when-supplicant-goes-down.patch
4750
=== added file 'debian/patches/wifi-wpas-inactive.patch'
--- debian/patches/wifi-wpas-inactive.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/wifi-wpas-inactive.patch 2016-04-27 16:19:01 +0000
@@ -0,0 +1,30 @@
1---
2 src/devices/wifi/nm-device-wifi.c | 15 +++++++++++++++
3 1 file changed, 15 insertions(+)
4
5Index: b/src/devices/wifi/nm-device-wifi.c
6===================================================================
7--- a/src/devices/wifi/nm-device-wifi.c
8+++ b/src/devices/wifi/nm-device-wifi.c
9@@ -1903,6 +1903,21 @@ supplicant_iface_state_cb (NMSupplicantI
10 else
11 _LOGI (LOGD_DEVICE | LOGD_WIFI, "supplicant interface keeps failing, giving up");
12 break;
13+ case NM_SUPPLICANT_INTERFACE_STATE_INACTIVE:
14+ if (old_state == NM_SUPPLICANT_INTERFACE_STATE_SCANNING) {
15+ nm_log_warn (LOGD_HW | LOGD_WIFI, "(%s): supplicant state: SCANNING -> INACTIVE",
16+ nm_device_get_iface (NM_DEVICE (self)));
17+
18+ if (priv->requested_scan) {
19+ nm_log_dbg (LOGD_WIFI_SCAN, "(%s): clearing requested_scan",
20+ nm_device_get_iface (NM_DEVICE (self)));
21+
22+ priv->requested_scan = FALSE;
23+ }
24+
25+ cancel_pending_scan (self);
26+ request_wireless_scan (self, NULL);
27+ }
28 default:
29 break;
30 }
031
=== modified file 'debian/patches/wwan-add-ofono-modem-support.patch'
--- debian/patches/wwan-add-ofono-modem-support.patch 2016-04-08 14:49:37 +0000
+++ debian/patches/wwan-add-ofono-modem-support.patch 2016-04-27 16:19:01 +0000
@@ -9,13 +9,12 @@
9---9---
10 configure.ac | 9 10 configure.ac | 9
11 src/devices/wwan/Makefile.am | 7 11 src/devices/wwan/Makefile.am | 7
12 src/devices/wwan/nm-device-modem.c | 20 12 src/devices/wwan/nm-modem-manager.c | 238 +++++
13 src/devices/wwan/nm-modem-manager.c | 220 +++++13 src/devices/wwan/nm-modem-ofono.c | 1435 ++++++++++++++++++++++++++++++++++++
14 src/devices/wwan/nm-modem-ofono.c | 1449 ++++++++++++++++++++++++++++++++++++
15 src/devices/wwan/nm-modem-ofono.h | 64 +14 src/devices/wwan/nm-modem-ofono.h | 64 +
16 src/devices/wwan/nm-modem.c | 8 15 src/devices/wwan/nm-modem.c | 8
17 src/nm-core-utils.c | 20 16 src/nm-core-utils.c | 20
18 8 files changed, 1787 insertions(+), 10 deletions(-)17 7 files changed, 1762 insertions(+), 19 deletions(-)
1918
20Index: b/configure.ac19Index: b/configure.ac
21===================================================================20===================================================================
@@ -93,58 +92,6 @@
93 WWAN_SYMBOL_VIS_FILE=$(srcdir)/wwan-exports.ver92 WWAN_SYMBOL_VIS_FILE=$(srcdir)/wwan-exports.ver
94 93
95 libnm_wwan_la_LDFLAGS = \94 libnm_wwan_la_LDFLAGS = \
96Index: b/src/devices/wwan/nm-device-modem.c
97===================================================================
98--- a/src/devices/wwan/nm-device-modem.c
99+++ b/src/devices/wwan/nm-device-modem.c
100@@ -100,6 +100,7 @@ modem_prepare_result (NMModem *modem,
101 if (success)
102 nm_device_activate_schedule_stage2_device_config (device);
103 else {
104+
105 if (reason == NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT) {
106 /* If the connect failed because the SIM PIN was wrong don't allow
107 * the device to be auto-activated anymore, which would risk locking
108@@ -282,6 +283,16 @@ modem_state_cb (NMModem *modem,
109 }
110 }
111
112+ if (dev_state >= NM_DEVICE_STATE_DISCONNECTED &&
113+ new_state == NM_MODEM_STATE_REGISTERED && old_state < NM_MODEM_STATE_REGISTERED) {
114+
115+ nm_log_info (LOGD_MB, "(%s): modem re-registered; re-checking autoconnect",
116+ nm_device_get_iface (device));
117+
118+ g_object_set (G_OBJECT (device), NM_DEVICE_AUTOCONNECT, TRUE, NULL);
119+ nm_device_emit_recheck_auto_activate (device);
120+ }
121+
122 if (new_state < NM_MODEM_STATE_CONNECTING &&
123 old_state >= NM_MODEM_STATE_CONNECTING &&
124 dev_state >= NM_DEVICE_STATE_NEED_AUTH &&
125@@ -345,6 +356,14 @@ device_state_changed (NMDevice *device,
126 nm_modem_state_to_string (nm_modem_get_state (priv->modem)));
127 }
128
129+ /* Block autoconnect until the modem is registered again */
130+ if (new_state == NM_DEVICE_STATE_FAILED && nm_modem_get_state (priv->modem) == NM_MODEM_STATE_SEARCHING) {
131+ nm_log_info (LOGD_MB, "(%s): modem searching; disabling autoconnect",
132+ nm_device_get_iface (device));
133+
134+ g_object_set (G_OBJECT (device), NM_DEVICE_AUTOCONNECT, FALSE, NULL);
135+ }
136+
137 nm_modem_device_state_changed (priv->modem, new_state, old_state, reason);
138
139 switch (reason) {
140@@ -545,6 +564,7 @@ get_ip_iface_identifier (NMDevice *devic
141
142 g_return_val_if_fail (priv->modem, FALSE);
143 success = nm_modem_get_iid (priv->modem, out_iid);
144+
145 if (!success)
146 success = NM_DEVICE_CLASS (nm_device_modem_parent_class)->get_ip_iface_identifier (device, out_iid);
147 return success;
148Index: b/src/devices/wwan/nm-modem-manager.c95Index: b/src/devices/wwan/nm-modem-manager.c
149===================================================================96===================================================================
150--- a/src/devices/wwan/nm-modem-manager.c97--- a/src/devices/wwan/nm-modem-manager.c
@@ -288,7 +235,7 @@
288+{235+{
289+ gchar *name_owner;236+ gchar *name_owner;
290+237+
291+ name_owner = g_dbus_object_manager_client_get_name_owner (G_DBUS_OBJECT_MANAGER_CLIENT (self->priv->ofono_proxy));238+ name_owner = g_dbus_proxy_get_name_owner (G_DBUS_OBJECT_MANAGER_CLIENT (self->priv->ofono_proxy));
292+ if (name_owner) {239+ if (name_owner) {
293+ /* Available! */240+ /* Available! */
294+ ofono_appeared (self);241+ ofono_appeared (self);
@@ -361,6 +308,35 @@
361 308
362 static void309 static void
363 modem_manager_poke_cb (GDBusConnection *connection,310 modem_manager_poke_cb (GDBusConnection *connection,
311@@ -233,19 +415,19 @@ modem_manager_poke_cb (GDBusConnection *
312
313 result = g_dbus_connection_call_finish (connection, res, &error);
314 if (error) {
315- /* Ignore common errors when MM is not installed and such */
316- if ( !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN)
317- && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_EXEC_FAILED)
318- && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_FORK_FAILED)
319- && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_FAILED)
320- && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_TIMEOUT)
321+ nm_log_warn (LOGD_MB, "error poking ModemManager: %s",
322+ error ? error->message : "");
323+
324+ /* Don't reschedule poke is MM service doesn't exist. */
325+ if (!g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN)
326 && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND)) {
327- nm_log_dbg (LOGD_MB, "error poking ModemManager: %s", error->message);
328+
329+ /* Setup timeout to relaunch */
330+ schedule_modem_manager_relaunch (self, MODEM_POKE_INTERVAL);
331 }
332+
333 g_error_free (error);
334
335- /* Setup timeout to relaunch */
336- schedule_modem_manager_relaunch (self, MODEM_POKE_INTERVAL);
337 } else
338 g_variant_unref (result);
339
364@@ -336,22 +518,44 @@ manager_new_ready (GObject *source,340@@ -336,22 +518,44 @@ manager_new_ready (GObject *source,
365 static void341 static void
366 ensure_client (NMModemManager *self)342 ensure_client (NMModemManager *self)
@@ -496,7 +472,7 @@
496===================================================================472===================================================================
497--- /dev/null473--- /dev/null
498+++ b/src/devices/wwan/nm-modem-ofono.c474+++ b/src/devices/wwan/nm-modem-ofono.c
499@@ -0,0 +1,1449 @@475@@ -0,0 +1,1435 @@
500+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */476+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
501+/* NetworkManager -- Network link manager477+/* NetworkManager -- Network link manager
502+ *478+ *
@@ -709,12 +685,7 @@
709+ nm_log_dbg (LOGD_MB, "(%s): modem disconnected",685+ nm_log_dbg (LOGD_MB, "(%s): modem disconnected",
710+ nm_modem_get_uid (NM_MODEM (self)));686+ nm_modem_get_uid (NM_MODEM (self)));
711+687+
712+ /* NOTES(1.2): This doesn't accomplish anything as none of the attributes that688+ update_modem_state (self);
713+ * are checked by update_modem_state are changed by this function!
714+ *
715+ * update_modem_state (self);
716+ */
717+
718+ disconnect_context_complete (ctx);689+ disconnect_context_complete (ctx);
719+}690+}
720+691+
@@ -889,7 +860,7 @@
889+ &error);860+ &error);
890+ if (!v_properties) {861+ if (!v_properties) {
891+ g_dbus_error_strip_remote_error (error);862+ g_dbus_error_strip_remote_error (error);
892+ nm_log_warn (LOGD_BT, "(%s) error getting sim properties: %s",863+ nm_log_warn (LOGD_MB, "(%s) error getting sim properties: %s",
893+ nm_modem_get_uid (NM_MODEM (self)),864+ nm_modem_get_uid (NM_MODEM (self)),
894+ error->message);865+ error->message);
895+ g_error_free (error);866+ g_error_free (error);
@@ -900,7 +871,7 @@
900+871+
901+ v_dict = g_variant_get_child_value (v_properties, 0);872+ v_dict = g_variant_get_child_value (v_properties, 0);
902+ if (!v_dict) {873+ if (!v_dict) {
903+ nm_log_warn (LOGD_BT, "(%s) error getting sim properties: no v_dict",874+ nm_log_warn (LOGD_MB, "(%s) error getting sim properties: no v_dict",
904+ nm_modem_get_uid (NM_MODEM (self)));875+ nm_modem_get_uid (NM_MODEM (self)));
905+ return;876+ return;
906+ }877+ }
@@ -1002,7 +973,7 @@
1002+ gboolean attached = g_variant_get_boolean (v);973+ gboolean attached = g_variant_get_boolean (v);
1003+974+
1004+ nm_log_dbg (LOGD_MB, "(%s): Attached: %s",975+ nm_log_dbg (LOGD_MB, "(%s): Attached: %s",
1005+ nm_modem_get_uid (NM_MODEM (self)), property ? "True" : "False");976+ nm_modem_get_uid (NM_MODEM (self)), attached ? "True" : "False");
1006+977+
1007+ if (priv->gprs_attached != attached) {978+ if (priv->gprs_attached != attached) {
1008+ priv->gprs_attached = attached;979+ priv->gprs_attached = attached;
@@ -1046,7 +1017,7 @@
1046+ &error);1017+ &error);
1047+ if (!v_properties) {1018+ if (!v_properties) {
1048+ g_dbus_error_strip_remote_error (error);1019+ g_dbus_error_strip_remote_error (error);
1049+ nm_log_warn (LOGD_BT, "(%s) error getting connman properties: %s",1020+ nm_log_warn (LOGD_MB, "(%s) error getting connman properties: %s",
1050+ nm_modem_get_uid (NM_MODEM (self)),1021+ nm_modem_get_uid (NM_MODEM (self)),
1051+ error->message);1022+ error->message);
1052+ g_error_free (error);1023+ g_error_free (error);
@@ -1226,7 +1197,7 @@
1226+ &error);1197+ &error);
1227+ if (!v_properties) {1198+ if (!v_properties) {
1228+ g_dbus_error_strip_remote_error (error);1199+ g_dbus_error_strip_remote_error (error);
1229+ nm_log_warn (LOGD_BT, "(%s) error getting modem properties: %s",1200+ nm_log_warn (LOGD_MB, "(%s) error getting modem properties: %s",
1230+ nm_modem_get_uid (NM_MODEM (self)),1201+ nm_modem_get_uid (NM_MODEM (self)),
1231+ error->message);1202+ error->message);
1232+ g_error_free (error);1203+ g_error_free (error);
@@ -1235,7 +1206,7 @@
1235+1206+
1236+ v_dict = g_variant_get_child_value (v_properties, 0);1207+ v_dict = g_variant_get_child_value (v_properties, 0);
1237+ if (!v_dict) {1208+ if (!v_dict) {
1238+ nm_log_warn (LOGD_BT, "(%s) error getting modem properties: no v_dict",1209+ nm_log_warn (LOGD_MB, "(%s) error getting modem properties: no v_dict",
1239+ nm_modem_get_uid (NM_MODEM (self)));1210+ nm_modem_get_uid (NM_MODEM (self)));
1240+ return;1211+ return;
1241+ }1212+ }
@@ -1331,14 +1302,6 @@
1331+ nm_log_dbg (LOGD_MB, "PropertyChanged: %s", property);1302+ nm_log_dbg (LOGD_MB, "PropertyChanged: %s", property);
1332+1303+
1333+ /*1304+ /*
1334+ * 0.9.10.x:
1335+ *
1336+ * The old code got PropertyChanged for Settings, and then immediately
1337+ * called 'GetProperties' to get the current values of 'Settings'.
1338+ *
1339+ * There's no need to do this, as the PropertyChanged has the value of
1340+ * 'Settings' as its payload!!!
1341+ *
1342+ * TODO: might be a good idea and re-factor this to mimic bluez-device,1305+ * TODO: might be a good idea and re-factor this to mimic bluez-device,
1343+ * ie. have this function just check the key, and call a sub-func to1306+ * ie. have this function just check the key, and call a sub-func to
1344+ * handle the action.1307+ * handle the action.
@@ -1347,24 +1310,14 @@
1347+ if (g_strcmp0 (property, "Settings") != 0)1310+ if (g_strcmp0 (property, "Settings") != 0)
1348+ return;1311+ return;
1349+1312+
1350+ nm_log_dbg (LOGD_MB, "found 'Settings' DICTIONARY property");
1351+
1352+ if (nm_modem_get_state (NM_MODEM (self)) == NM_MODEM_STATE_CONNECTED && g_variant_n_children (v) <= 0) {
1353+ nm_log_warn (LOGD_MB, "ofono: (%s): Settings empty", nm_modem_get_uid (NM_MODEM (self)));
1354+
1355+ goto out;
1356+ }
1357+
1358+ nm_log_info (LOGD_MB, "ofono: (%s): IPv4 static configuration:", nm_modem_get_uid (NM_MODEM (self)));
1359+
1360+ v_dict = g_variant_get_child_value (v, 0);1313+ v_dict = g_variant_get_child_value (v, 0);
1361+ if (!v_dict) {1314+ if (!v_dict) {
1362+ nm_log_warn (LOGD_BT, "ofono: (%s): error getting IPv4 Settings: no v_dict",1315+ nm_log_warn (LOGD_MB, "ofono: (%s): error getting IPv4 Settings",
1363+ nm_modem_get_uid (NM_MODEM (self)));1316+ nm_modem_get_uid (NM_MODEM (self)));
1364+ return;1317+ goto out;
1365+ }1318+ }
1366+1319+
1367+ /* NOTE - 0.9.10x code didn't fail if 'Interface' missing */1320+ nm_log_info (LOGD_MB, "ofono: (%s): IPv4 static Settings:", nm_modem_get_uid (NM_MODEM (self)));
1368+1321+
1369+ if (g_variant_lookup (v_dict, "Interface", "&s", &s)) {1322+ if (g_variant_lookup (v_dict, "Interface", "&s", &s)) {
1370+1323+
@@ -1376,7 +1329,7 @@
1376+ NM_MODEM_IP4_METHOD, NM_MODEM_IP_METHOD_STATIC,1329+ NM_MODEM_IP4_METHOD, NM_MODEM_IP_METHOD_STATIC,
1377+ NULL);1330+ NULL);
1378+ } else {1331+ } else {
1379+ nm_log_warn (LOGD_BT, "ofono: (%s): Settings 'Interface'; empty",1332+ nm_log_warn (LOGD_MB, "ofono: (%s): Settings 'Interface'; empty",
1380+ nm_modem_get_uid (NM_MODEM (self)));1333+ nm_modem_get_uid (NM_MODEM (self)));
1381+ goto out;1334+ goto out;
1382+ }1335+ }
@@ -1428,6 +1381,7 @@
1428+ } else {1381+ } else {
1429+ nm_log_warn (LOGD_MB, "ofono: (%s): Settings 'Address' missing",1382+ nm_log_warn (LOGD_MB, "ofono: (%s): Settings 'Address' missing",
1430+ nm_modem_get_uid (NM_MODEM (self)));1383+ nm_modem_get_uid (NM_MODEM (self)));
1384+ goto out;
1431+ }1385+ }
1432+1386+
1433+ if (g_variant_lookup (v_dict, "Netmask", "&s", &s)) {1387+ if (g_variant_lookup (v_dict, "Netmask", "&s", &s)) {
@@ -1450,7 +1404,8 @@
1450+ goto out;1404+ goto out;
1451+ }1405+ }
1452+1406+
1453+ nm_log_info (LOGD_MB, " address %s/%d", addr_s, prefix);1407+ nm_log_info (LOGD_MB, "ofono (%s) Address: %s/%d",
1408+ nm_modem_get_uid (NM_MODEM (self)), addr_s, prefix);
1454+ nm_ip4_config_add_address (priv->ip4_config, &addr);1409+ nm_ip4_config_add_address (priv->ip4_config, &addr);
1455+1410+
1456+ if (g_variant_lookup (v_dict, "Gateway", "&s", &s)) {1411+ if (g_variant_lookup (v_dict, "Gateway", "&s", &s)) {
@@ -1477,7 +1432,7 @@
1477+1432+
1478+ while (*iter) {1433+ while (*iter) {
1479+ if (ip_string_to_network_address (*iter, &address_network) && address_network > 0) {1434+ if (ip_string_to_network_address (*iter, &address_network) && address_network > 0) {
1480+ nm_log_info (LOGD_MB, "ofono: (%s): DNS %s",1435+ nm_log_info (LOGD_MB, "ofono: (%s): DNS: %s",
1481+ nm_modem_get_uid (NM_MODEM (self)), *iter);1436+ nm_modem_get_uid (NM_MODEM (self)), *iter);
1482+1437+
1483+ nm_ip4_config_add_nameserver (priv->ip4_config, address_network);1438+ nm_ip4_config_add_nameserver (priv->ip4_config, address_network);
@@ -1489,13 +1444,15 @@
1489+ *iter++;1444+ *iter++;
1490+ }1445+ }
1491+1446+
1492+ /* TOOD: check for minimum NameServers >= 1? */1447+ if (iter == array) {
1448+ nm_log_warn (LOGD_MB, "ofono: (%s): Settings: 'DomainNameServers': none specified",
1449+ nm_modem_get_uid (NM_MODEM (self)));
1450+ g_free (array);
1451+ goto out;
1452+ }
1493+1453+
1494+ g_free (array);1454+ g_free (array);
1495+ } else {1455+ } else {
1496+
1497+ /* NOTE - 0.9.10.x would not throw an error in this case!!! */
1498+
1499+ nm_log_warn (LOGD_MB, "ofono: (%s): Settings 'DomainNameServers' missing",1456+ nm_log_warn (LOGD_MB, "ofono: (%s): Settings 'DomainNameServers' missing",
1500+ nm_modem_get_uid (NM_MODEM (self)));1457+ nm_modem_get_uid (NM_MODEM (self)));
1501+ goto out;1458+ goto out;
@@ -1524,14 +1481,19 @@
1524+ ret = TRUE;1481+ ret = TRUE;
1525+1482+
1526+out:1483+out:
1527+ if (!ret)1484+ if (nm_modem_get_state (NM_MODEM (self)) != NM_MODEM_STATE_CONNECTED) {
1528+ reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE;1485+ nm_log_info (LOGD_MB, "ofono: (%s): emitting PREPARE_RESULT: %s",
1529+1486+ nm_modem_get_uid (NM_MODEM (self)), ret ? "TRUE" : "FALSE");
1530+ nm_log_dbg (LOGD_MB, "(%s): DONE w/Settings; ret: %s",1487+
1531+ nm_modem_get_uid (NM_MODEM (self)), ret ? "TRUE" : "FALSE");1488+ if (!ret)
1532+1489+ reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE;
1533+ if (nm_modem_get_state (NM_MODEM (self)) != NM_MODEM_STATE_CONNECTED)1490+
1534+ g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, ret, reason);1491+ g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, ret, reason);
1492+ } else {
1493+ nm_log_warn (LOGD_MB, "ofono: (%s): MODEM_PPP_FAILED", nm_modem_get_uid (NM_MODEM (self)));
1494+
1495+ g_signal_emit_by_name (self, NM_MODEM_PPP_FAILED, NM_DEVICE_STATE_REASON_PPP_FAILED);
1496+ }
1535+}1497+}
1536+1498+
1537+static NMActStageReturn1499+static NMActStageReturn
15381500
=== modified file 'debian/rules'
--- debian/rules 2016-04-06 20:01:36 +0000
+++ debian/rules 2016-04-27 16:19:01 +0000
@@ -2,11 +2,24 @@
22
3include /usr/share/dpkg/architecture.mk3include /usr/share/dpkg/architecture.mk
44
5PPPD_PLUGIN_DIR := $(shell dh_ppp --plugin-dir)5# The following line is used by 1.2x desktop, but doesn't
6# work on vivid or wily, preventing a source package from
7# being built on this releases. This is because ppp 2.4.6-3*
8# doesn't include dh_ppp.
9#
10# PPPD_PLUGIN_DIR := $(shell dh_ppp --plugin-dir)
6DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)11DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
712
8%:13%:
9 dh $@ --with gir,systemd,autoreconf,ppp14# This is from the 1.2x desktop branch; ppp fails due to lack of
15# dh_ppp ( see above ). This is a no-op until we fix pptp VPN
16# on the phone. gir fails when building the binary packages with
17# the error:
18#
19# dh_girepository: Could not find gir file for NM-1.0.typelib
20#
21# dh $@ --with gir,systemd,autoreconf,ppp
22 dh $@ --with systemd,autoreconf
1023
11autoreconf:24autoreconf:
12 gtkdocize --copy25 gtkdocize --copy
@@ -19,14 +32,13 @@
19override_dh_auto_configure:32override_dh_auto_configure:
20 dh_auto_configure -- \33 dh_auto_configure -- \
21 --libexecdir=/usr/lib/NetworkManager \34 --libexecdir=/usr/lib/NetworkManager \
22 --with-pppd-plugin-dir=$(PPPD_PLUGIN_DIR) \
23 --with-pppd=/usr/sbin/pppd \
24 --with-resolvconf=/sbin/resolvconf \35 --with-resolvconf=/sbin/resolvconf \
25 --with-dhclient=/sbin/dhclient \36 --with-dhclient=/sbin/dhclient \
26 --with-iptables=/sbin/iptables \37 --with-iptables=/sbin/iptables \
27 --with-dnsmasq=/usr/sbin/dnsmasq \38 --with-dnsmasq=/usr/sbin/dnsmasq \
28 --with-dnssec-trigger=/usr/lib/dnssec-trigger/dnssec-trigger-script \39 --with-dnssec-trigger=/usr/lib/dnssec-trigger/dnssec-trigger-script \
29 --with-systemdsystemunitdir=/lib/systemd/system \40 --with-systemdsystemunitdir=/lib/systemd/system \
41 --with-systemd-journal=no \
30 --with-udev-dir=/lib/udev \42 --with-udev-dir=/lib/udev \
31 --with-crypto=gnutls \43 --with-crypto=gnutls \
32 --with-session-tracking=systemd \44 --with-session-tracking=systemd \
@@ -36,9 +48,9 @@
36 --with-nmcli \48 --with-nmcli \
37 --disable-more-warnings \49 --disable-more-warnings \
38 --disable-modify-system \50 --disable-modify-system \
51 --disable-bluez5 \
39 --enable-polkit \52 --enable-polkit \
40 --enable-polkit-agent \53 --enable-polkit-agent \
41 --enable-ppp \
42 --enable-ifupdown \54 --enable-ifupdown \
43 --enable-config-plugin-ibft \55 --enable-config-plugin-ibft \
44 --enable-introspection \56 --enable-introspection \
@@ -46,8 +58,7 @@
46 --enable-concheck \58 --enable-concheck \
47 --enable-teamdctl=no \59 --enable-teamdctl=no \
48 --enable-vala \60 --enable-vala \
49 --with-tests \61 --with-tests
50 --enable-bluez5-dun
5162
52override_dh_install:63override_dh_install:
53 rm -vf $(CURDIR)/debian/tmp/etc/init.d/NetworkManager64 rm -vf $(CURDIR)/debian/tmp/etc/init.d/NetworkManager
@@ -59,6 +70,9 @@
59 # copy dnsmasq configuration70 # copy dnsmasq configuration
60 mkdir -p debian/network-manager/etc/dnsmasq.d71 mkdir -p debian/network-manager/etc/dnsmasq.d
61 cp debian/network-manager.dnsmasq debian/network-manager/etc/dnsmasq.d/network-manager72 cp debian/network-manager.dnsmasq debian/network-manager/etc/dnsmasq.d/network-manager
73 mkdir -p debian/network-manager/etc/polkit-1/localauthority/50-local.d
74 cp debian/indicator-network.pkla \
75 debian/network-manager/etc/polkit-1/localauthority/50-local.d/org.freedesktop.NetworkManager.pkla
6276
63override_dh_installinit:77override_dh_installinit:
64 dh_installinit --noscripts78 dh_installinit --noscripts
@@ -67,7 +81,7 @@
67 dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/NetworkManager/ -X/usr/lib/pppd/81 dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/NetworkManager/ -X/usr/lib/pppd/
6882
69override_dh_strip:83override_dh_strip:
70 dh_strip --dbgsym-migration='network-manager-dbg (<< 1.1.91-2~)'84 dh_strip --dbg-package=network-manager-dbg
7185
72override_dh_systemd_enable:86override_dh_systemd_enable:
73 dh_systemd_enable -pnetwork-manager NetworkManager-dispatcher.service87 dh_systemd_enable -pnetwork-manager NetworkManager-dispatcher.service
@@ -81,9 +95,6 @@
81 dh_systemd_start -pnetwork-manager --no-start NetworkManager-wait-online.service95 dh_systemd_start -pnetwork-manager --no-start NetworkManager-wait-online.service
82 dh_systemd_start -pnetwork-manager --restart-after-upgrade NetworkManager.service96 dh_systemd_start -pnetwork-manager --restart-after-upgrade NetworkManager.service
8397
84override_dh_ppp:
85 dh_ppp --breaks
86
87override_dh_auto_test:98override_dh_auto_test:
88ifeq (, $(filter nocheck, $(DEB_BUILD_OPTIONS)))99ifeq (, $(filter nocheck, $(DEB_BUILD_OPTIONS)))
89 make check || ( find . -name test-suite.log -exec cat {} \;; exit 1; )100 make check || ( find . -name test-suite.log -exec cat {} \;; exit 1; )

Subscribers

People subscribed via source and target branches

to all changes: