summaryrefslogtreecommitdiff
path: root/net-libs/libnm-glib/files
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/libnm-glib/files')
-rw-r--r--net-libs/libnm-glib/files/1.18.4-iwd1-compat.patch81
-rw-r--r--net-libs/libnm-glib/files/libnm-glib-data-fix-the-ID_NET_DRIVER-udev-rule.patch33
2 files changed, 114 insertions, 0 deletions
diff --git a/net-libs/libnm-glib/files/1.18.4-iwd1-compat.patch b/net-libs/libnm-glib/files/1.18.4-iwd1-compat.patch
new file mode 100644
index 00000000..12c8b873
--- /dev/null
+++ b/net-libs/libnm-glib/files/1.18.4-iwd1-compat.patch
@@ -0,0 +1,81 @@
+From 59923ad85d1a1cf2216a4f14649702d24d3f2360 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak@v3.sk>
+Date: Sat, 2 Nov 2019 06:55:54 +0100
+Subject: [PATCH 1/2] iwd: add some missing error handling
+
+g_dbus_object_manager_get_interface() can happily return NULL and we
+need to check for that.
+---
+ src/devices/wifi/nm-iwd-manager.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/devices/wifi/nm-iwd-manager.c b/src/devices/wifi/nm-iwd-manager.c
+index dd1cad480..e83f8063c 100644
+--- a/src/devices/wifi/nm-iwd-manager.c
++++ b/src/devices/wifi/nm-iwd-manager.c
+@@ -136,6 +136,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) {
+@@ -260,6 +265,11 @@ register_agent (NMIwdManager *self)
+ "/",
+ 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",
+--
+2.20.1
+
+
+From 186d22a9634e2bf94658ed6f1cf2b332ecb3a32c Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak@v3.sk>
+Date: Sat, 2 Nov 2019 07:01:28 +0100
+Subject: [PATCH 2/2] iwd: unbreak iwd-1.0
+
+The upstream apparently thought it's a great idea to change the agent
+manager path. This fixes things for those unfortunate enough to run
+IWD.
+---
+ src/devices/wifi/nm-iwd-manager.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/src/devices/wifi/nm-iwd-manager.c b/src/devices/wifi/nm-iwd-manager.c
+index e83f8063c..470cb1c90 100644
+--- a/src/devices/wifi/nm-iwd-manager.c
++++ b/src/devices/wifi/nm-iwd-manager.c
+@@ -262,9 +262,17 @@ 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;
+--
+2.20.1
+
diff --git a/net-libs/libnm-glib/files/libnm-glib-data-fix-the-ID_NET_DRIVER-udev-rule.patch b/net-libs/libnm-glib/files/libnm-glib-data-fix-the-ID_NET_DRIVER-udev-rule.patch
new file mode 100644
index 00000000..1b94ab47
--- /dev/null
+++ b/net-libs/libnm-glib/files/libnm-glib-data-fix-the-ID_NET_DRIVER-udev-rule.patch
@@ -0,0 +1,33 @@
+From 27d380b70ea839c7badab420361e4e65e023e8e9 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak@v3.sk>
+Date: Fri, 16 Aug 2019 13:22:09 +0200
+Subject: [PATCH] data: fix the ID_NET_DRIVER udev rule
+
+Systemd v243 is complaining about the wrong substitution there. That is
+sort of harmless, because systemd-udevd in that version doesn't need the
+rule anyway. But still fix it, to avoid a warning.
+
+Also, newer udevd's $PATH doesn't include sbin. That is also okay,
+because we don't need the rule to actually work there. But fix it
+anyway.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1740655
+---
+ data/84-nm-drivers.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/data/84-nm-drivers.rules b/data/84-nm-drivers.rules
+index d246ef6ce..e398cb9f2 100644
+--- a/data/84-nm-drivers.rules
++++ b/data/84-nm-drivers.rules
+@@ -7,6 +7,6 @@ ACTION!="add|change", GOTO="nm_drivers_end"
+ # Determine ID_NET_DRIVER if there's no ID_NET_DRIVER or DRIVERS (old udev?)
+ ENV{ID_NET_DRIVER}=="?*", GOTO="nm_drivers_end"
+ DRIVERS=="?*", GOTO="nm_drivers_end"
+-PROGRAM="/bin/sh -c 'ethtool -i $1 | sed -n s/^driver:\ //p' -- $env{INTERFACE}", RESULT=="?*", ENV{ID_NET_DRIVER}="%c"
++PROGRAM="/bin/sh -c '/usr/sbin/ethtool -i $$1 |/usr/bin/sed -n s/^driver:\ //p' -- $env{INTERFACE}", ENV{ID_NET_DRIVER}="%c"
+
+ LABEL="nm_drivers_end"
+--
+2.21.0
+