From 0d0e786d09b124d64316e630a56e920878930bb2 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Sat, 15 Sep 2018 19:54:16 +0200 Subject: [PATCH] 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 --- plugins/udevng.c | 5 +++++ 1 file changed, 5 insertions(+) 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; }