aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2018-09-15 19:54:16 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-12-17 16:00:47 +0100
commit73e7f8bec0c3dd77dc4f41ee7bd9fa3275f94a39 (patch)
treea11e84def271906f2d28560fa308f88bf27a75b7
parented923326c4a0baa1376059ee66e7fdcb3c80b694 (diff)
downloadofono-73e7f8bec0c3dd77dc4f41ee7bd9fa3275f94a39.tar.gz
ofono-73e7f8bec0c3dd77dc4f41ee7bd9fa3275f94a39.tar.bz2
ofono-73e7f8bec0c3dd77dc4f41ee7bd9fa3275f94a39.tar.xz
ofono-73e7f8bec0c3dd77dc4f41ee7bd9fa3275f94a39.zip
NOT-FOR-MERGE: ignore disconnecting network interface
when moving a wwanX interface to a lxc container ofono gets "remove" event. Ignoring the "remove" events allow this to work without ofono is removing the whole modem
-rw-r--r--plugins/udevng.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/udevng.c b/plugins/udevng.c
index 4a38621b..9c061aa8 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -1496,6 +1496,11 @@ static gboolean check_remove(gpointer key, gpointer value, gpointer user_data)
for (list = modem->devices; list; list = list->next) {
struct device_info *info = list->data;
+ /* ignore net subsystem to allow the device to be given into
+ * an lxc container */
+ if (g_strcmp0(info->subsystem, "net") == 0)
+ continue;
+
if (g_strcmp0(info->devpath, devpath) == 0)
return TRUE;
}