about summary refs log tree commit diff
path: root/src/devices/wifi
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2019-11-06 20:46:28 +0100
committerMichael Biebl <biebl@debian.org>2019-11-06 20:46:28 +0100
commit515e1311d22086215e182f18a4529f24660ca4c3 (patch)
tree5b1d21eeceaa57d233d46ddfeeca5e0c1fc8b8a3 /src/devices/wifi
parent790e3946f0274a272fdda4d8697ce31a757a48d2 (diff)
parent9c642eac191ef0dce49855d8da0a9e9af18d5113 (diff)
Update upstream source from tag 'upstream/1.20.6'
Update to upstream version '1.20.6'
with Debian dir 93035bdc0e2b22e7410d6c70c55a21648f836a2f
Diffstat (limited to 'src/devices/wifi')
-rw-r--r--src/devices/wifi/nm-iwd-manager.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/devices/wifi/nm-iwd-manager.c b/src/devices/wifi/nm-iwd-manager.c
index 5b550ea4..c79f6cc6 100644
--- a/src/devices/wifi/nm-iwd-manager.c
+++ b/src/devices/wifi/nm-iwd-manager.c
@@ -150,6 +150,11 @@ agent_dbus_method_cb (GDBusConnection *connection,
 	network = g_dbus_object_manager_get_interface (priv->object_manager,
 	                                               network_path,
 	                                               NM_IWD_NETWORK_INTERFACE);
+	if (!network) {
+		_LOGE ("unable to find the network object");
+		return;
+	}
+
 
 	device_path = get_property_string_or_null (G_DBUS_PROXY (network), "Device");
 	if (!device_path) {
@@ -271,9 +276,22 @@ register_agent (NMIwdManager *self)
 	GDBusInterface *agent_manager;
 
 	agent_manager = g_dbus_object_manager_get_interface (priv->object_manager,
-	                                                     "/",
+	                                                     "/net/connman/iwd",
 	                                                     NM_IWD_AGENT_MANAGER_INTERFACE);
 
+	if (!agent_manager) {
+		/* IWD prior to 1.0 dated 30 October, 2019 has the agent manager on a
+		 * different path. */
+		agent_manager = g_dbus_object_manager_get_interface (priv->object_manager,
+		                                                     "/",
+		                                                     NM_IWD_AGENT_MANAGER_INTERFACE);
+	}
+
+	if (!agent_manager) {
+		_LOGE ("unable to register the IWD Agent: PSK/8021x Wi-Fi networks may not work");
+		return;
+	}
+
 	/* Register our agent */
 	g_dbus_proxy_call (G_DBUS_PROXY (agent_manager),
 	                   "RegisterAgent",