diff options
| author | Sjoerd Simons <sjoerd@luon.net> | 2013-10-25 21:28:12 +0200 |
|---|---|---|
| committer | Sjoerd Simons <sjoerd@luon.net> | 2013-10-25 21:29:44 +0200 |
| commit | 1005ae9164278136b3b0a5e8a4a4d3ea2d334a6d (patch) | |
| tree | da986473a200c84318df59b727784ca92b583a9e | |
| parent | 040c063d5ebdbf598fa680d29f1585440e343b70 (diff) | |
Update patches
* Dropped patches fixed upstream: + d/p/06-tear-down-connections-for-unavailable-devices.patch + d/p/07-duid-fallback.patch + d/p/08-ifupdown-clarify-name-of-connections-hash.patch + d/p/09-ifupdown-fix-naming-confusion-in-plugin-hash-tables.patch + d/p/10-ifupdown-recalculate-unmanaged-specs-on-interface-ch.patch * debian/patches/03-systemd.patch: Refreshed * debian/patches/05-force-online-with-unmanaged-devices.patch: Refreshes
| -rw-r--r-- | debian/changelog | 12 | ||||
| -rw-r--r-- | debian/patches/03-systemd.patch | 15 | ||||
| -rw-r--r-- | debian/patches/05-force-online-with-unmanaged-devices.patch | 20 | ||||
| -rw-r--r-- | debian/patches/06-tear-down-connections-for-unavailable-devices.patch | 29 | ||||
| -rw-r--r-- | debian/patches/07-duid-fallback.patch | 94 | ||||
| -rw-r--r-- | debian/patches/08-ifupdown-clarify-name-of-connections-hash.patch | 130 | ||||
| -rw-r--r-- | debian/patches/09-ifupdown-fix-naming-confusion-in-plugin-hash-tables.patch | 134 | ||||
| -rw-r--r-- | debian/patches/10-ifupdown-recalculate-unmanaged-specs-on-interface-ch.patch | 58 | ||||
| -rw-r--r-- | debian/patches/series | 5 |
9 files changed, 25 insertions, 472 deletions
diff --git a/debian/changelog b/debian/changelog index 81f1ca5e..ec03c55c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,8 +8,16 @@ network-manager (0.9.8.8-1) UNRELEASED; urgency=low [ Sjoerd Simons ] * Switch session tracking to systemd. * New upstream release - - -- Sjoerd Simons <sjoerd@debian.org> Fri, 25 Oct 2013 21:21:15 +0200 + * Dropped patches fixed upstream: + + d/p/06-tear-down-connections-for-unavailable-devices.patch + + d/p/07-duid-fallback.patch + + d/p/08-ifupdown-clarify-name-of-connections-hash.patch + + d/p/09-ifupdown-fix-naming-confusion-in-plugin-hash-tables.patch + + d/p/10-ifupdown-recalculate-unmanaged-specs-on-interface-ch.patch + * debian/patches/03-systemd.patch: Refreshed + * debian/patches/05-force-online-with-unmanaged-devices.patch: Refreshes + + -- Sjoerd Simons <sjoerd@debian.org> Fri, 25 Oct 2013 21:25:59 +0200 network-manager (0.9.8.0-5) unstable; urgency=low diff --git a/debian/patches/03-systemd.patch b/debian/patches/03-systemd.patch index ed1da53d..7d3d3d9d 100644 --- a/debian/patches/03-systemd.patch +++ b/debian/patches/03-systemd.patch @@ -4,23 +4,20 @@ Description: Debian specific tweaks for NetworkManager systemd service file - Do not install NetworkManager into the network.target, as this will lead to a dependency loop (NetworkManager is installed in /usr). Author: Michael Biebl <biebl@debian.org> -Index: network-manager/data/NetworkManager.service.in -=================================================================== ---- network-manager.orig/data/NetworkManager.service.in 2013-01-29 20:14:47.671547402 +0100 -+++ network-manager/data/NetworkManager.service.in 2013-01-29 20:15:03.927722604 +0100 -@@ -1,8 +1,6 @@ +--- a/data/NetworkManager.service.in ++++ b/data/NetworkManager.service.in +@@ -1,7 +1,5 @@ [Unit] Description=Network Manager - After=syslog.target -Wants=network.target -Before=network.target [Service] Type=dbus -@@ -18,5 +16,6 @@ +@@ -17,5 +15,5 @@ [Install] WantedBy=multi-user.target Alias=dbus-org.freedesktop.NetworkManager.service +Alias=network-manager.service - Also=NetworkManager-wait-online.service - + Also=NetworkManager-dispatcher.service +- diff --git a/debian/patches/05-force-online-with-unmanaged-devices.patch b/debian/patches/05-force-online-with-unmanaged-devices.patch index 76742c3b..31d5cadb 100644 --- a/debian/patches/05-force-online-with-unmanaged-devices.patch +++ b/debian/patches/05-force-online-with-unmanaged-devices.patch @@ -4,11 +4,9 @@ Description: Force online state with unmanaged devices online state to CONNECTED. Author: Michael Biebl <biebl@debian.org> Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512286 -Index: network-manager/src/nm-manager.c -=================================================================== ---- network-manager.orig/src/nm-manager.c 2013-02-09 03:23:39.166501824 +0100 -+++ network-manager/src/nm-manager.c 2013-02-09 03:23:39.158501727 +0100 -@@ -80,6 +80,8 @@ +--- a/src/nm-manager.c ++++ b/src/nm-manager.c +@@ -78,6 +78,8 @@ #define NM_AUTOIP_DBUS_SERVICE "org.freedesktop.nm_avahi_autoipd" #define NM_AUTOIP_DBUS_IFACE "org.freedesktop.nm_avahi_autoipd" @@ -17,7 +15,7 @@ Index: network-manager/src/nm-manager.c static gboolean impl_manager_get_devices (NMManager *manager, GPtrArray **devices, GError **err); -@@ -244,6 +246,11 @@ +@@ -249,6 +251,11 @@ guint fw_monitor_id; guint fw_changed_id; @@ -29,8 +27,8 @@ Index: network-manager/src/nm-manager.c guint timestamp_update_id; GHashTable *nm_bridges; -@@ -537,6 +544,14 @@ - break; +@@ -618,6 +625,14 @@ + } } + if (state == NM_DEVICE_STATE_UNMANAGED) { @@ -44,7 +42,7 @@ Index: network-manager/src/nm-manager.c if (nm_device_is_activating (dev)) new_state = NM_STATE_CONNECTING; else if (new_state != NM_STATE_CONNECTING) { -@@ -3859,6 +3874,65 @@ +@@ -4090,6 +4105,65 @@ } } @@ -110,7 +108,7 @@ Index: network-manager/src/nm-manager.c #define NM_PERM_DENIED_ERROR "org.freedesktop.NetworkManager.PermissionDenied" #define DEV_PERM_DENIED_ERROR "org.freedesktop.NetworkManager.Device.PermissionDenied" -@@ -4267,6 +4341,17 @@ +@@ -4506,6 +4580,17 @@ g_object_unref (priv->fw_monitor); } @@ -128,7 +126,7 @@ Index: network-manager/src/nm-manager.c g_slist_free (priv->factories); if (priv->timestamp_update_id) { -@@ -4595,6 +4680,23 @@ +@@ -4865,6 +4950,23 @@ KERNEL_FIRMWARE_DIR); } diff --git a/debian/patches/06-tear-down-connections-for-unavailable-devices.patch b/debian/patches/06-tear-down-connections-for-unavailable-devices.patch deleted file mode 100644 index 4f645790..00000000 --- a/debian/patches/06-tear-down-connections-for-unavailable-devices.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit 22d2f571ce77f78d78a131c8df7fcbcf265b4137 -Author: Dan Williams <dcbw@redhat.com> -Date: Thu May 2 14:39:51 2013 -0500 - - core: ensure ActiveConnections are torn down when device is unavailable (bgo #676285) - - If a device becomes unmanaged or unavailable (eg, due to loss of carrier, becoming - unmanaged, rfkilled, supplicant crashing, etc), the ActiveConnection would simply - set state to UNKNOWN and the Manager wouldn't tear it down and remove it from the - ActiveConnections property list. Instead, these states should be treated the same - as if the device was deactivated cleanly so that the AC will accurately reflect - the device state and the Manager will clean the AC up. - - Fixes comment #12 in: - https://bugzilla.gnome.org/show_bug.cgi?id=676285 - -diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c -index 76949cf..e17f2a7 100644 ---- a/src/nm-activation-request.c -+++ b/src/nm-activation-request.c -@@ -318,6 +318,8 @@ device_state_changed (NMDevice *device, GParamSpec *pspec, NMActRequest *self) - break; - case NM_DEVICE_STATE_FAILED: - case NM_DEVICE_STATE_DISCONNECTED: -+ case NM_DEVICE_STATE_UNMANAGED: -+ case NM_DEVICE_STATE_UNAVAILABLE: - ac_state = NM_ACTIVE_CONNECTION_STATE_DEACTIVATED; - - /* No longer need to pay attention to device state */ diff --git a/debian/patches/07-duid-fallback.patch b/debian/patches/07-duid-fallback.patch deleted file mode 100644 index 6f07235d..00000000 --- a/debian/patches/07-duid-fallback.patch +++ /dev/null @@ -1,94 +0,0 @@ -commit 0bf0ee7136dff2b9a6435221987f447e11eea285 -Author: Dan Williams <dcbw@redhat.com> -Date: Fri Mar 15 16:49:39 2013 -0500 - - dhcp: look harder for machine-id, and generate random DUID if it doesn't exist (bgo #696109) - - Not all systems have machine-id in /etc, some still have it in /var/lib/dbus/ - especially if they aren't using systemd. Furthermore, if we don't have - any machine-id file (like in the future, if we don't have a messaebus - daemon running) fall back to a random DUID as a last resort. - -Index: network-manager/src/dhcp-manager/nm-dhcp-client.c -=================================================================== ---- network-manager.orig/src/dhcp-manager/nm-dhcp-client.c 2013-05-08 20:19:08.998435531 +0200 -+++ network-manager/src/dhcp-manager/nm-dhcp-client.c 2013-05-08 20:19:08.994435487 +0200 -@@ -354,40 +354,44 @@ - { - GByteArray *duid; - char *contents = NULL; -- GError *error = NULL; - GChecksum *sum; - guint8 buffer[32]; /* SHA256 digest size */ - gsize sumlen = sizeof (buffer); - const guint16 duid_type = g_htons (4); - uuid_t uuid; -- gboolean success; -+ GRand *rand; -+ guint i; -+ gboolean success = FALSE; - - /* Get the machine ID from /etc/machine-id; it's always in /etc no matter -- * where our configured SYSCONFDIR is. -+ * where our configured SYSCONFDIR is. Alternatively, it might be in -+ * LOCALSTATEDIR /lib/dbus/machine-id. - */ -- if (!g_file_get_contents ("/etc/machine-id", &contents, NULL, &error)) { -- nm_log_warn (LOGD_DHCP6, "Failed to read " SYSCONFDIR "/machine-id to generate DHCPv6 DUID: (%d) %s", -- error ? error->code : -1, -- error ? error->message : "(unknown)"); -- g_clear_error (&error); -- return NULL; -+ if ( g_file_get_contents ("/etc/machine-id", &contents, NULL, NULL) -+ || g_file_get_contents (LOCALSTATEDIR "/lib/dbus/machine-id", &contents, NULL, NULL)) { -+ contents = g_strstrip (contents); -+ success = machine_id_parse (contents, uuid); -+ if (success) { -+ /* Hash the machine ID so it's not leaked to the network */ -+ sum = g_checksum_new (G_CHECKSUM_SHA256); -+ g_checksum_update (sum, (const guchar *) &uuid, sizeof (uuid)); -+ g_checksum_get_digest (sum, buffer, &sumlen); -+ g_checksum_free (sum); -+ } -+ g_free (contents); - } - -- contents = g_strstrip (contents); -- success = machine_id_parse (contents, uuid); -- g_free (contents); -- - if (!success) { -- nm_log_warn (LOGD_DHCP6, "Failed to parse " SYSCONFDIR "/machine-id to generate DHCPv6 DUID."); -- return NULL; -+ nm_log_warn (LOGD_DHCP6, "Failed to read " SYSCONFDIR "/machine-id " -+ "or " LOCALSTATEDIR "/lib/dbus/machine-id to generate " -+ "DHCPv6 DUID; creating non-persistent random DUID."); -+ -+ rand = g_rand_new (); -+ for (i = 0; i < sizeof (buffer) / sizeof (guint32); i++) -+ ((guint32 *) buffer)[i] = g_rand_int (rand); -+ g_rand_free (rand); - } - -- /* Hash the machine ID so it's not leaked to the network */ -- sum = g_checksum_new (G_CHECKSUM_SHA256); -- g_checksum_update (sum, (const guchar *) &uuid, sizeof (uuid)); -- g_checksum_get_digest (sum, buffer, &sumlen); -- g_checksum_free (sum); -- - /* Generate a DHCP Unique Identifier for DHCPv6 using the - * DUID-UUID method (see RFC 6355 section 4). Format is: - * -@@ -431,10 +435,11 @@ - - if (G_UNLIKELY (duid == NULL)) { - duid = generate_duid_from_machine_id (); -+ g_assert (duid); - - if (nm_logging_level_enabled (LOGL_DEBUG)) { - escaped = escape_duid (duid); -- nm_log_dbg (LOGD_DHCP6, "Generated DUID from machine-id: %s", escaped); -+ nm_log_dbg (LOGD_DHCP6, "Generated DUID %s", escaped); - g_free (escaped); - } - } diff --git a/debian/patches/08-ifupdown-clarify-name-of-connections-hash.patch b/debian/patches/08-ifupdown-clarify-name-of-connections-hash.patch deleted file mode 100644 index 3d1f81c7..00000000 --- a/debian/patches/08-ifupdown-clarify-name-of-connections-hash.patch +++ /dev/null @@ -1,130 +0,0 @@ -From 8128a3ada73a9572fa00ea02bd6a8a431157d312 Mon Sep 17 00:00:00 2001 -From: Dan Williams <dcbw@redhat.com> -Date: Tue, 7 May 2013 15:08:00 -0500 -Subject: [PATCH 1/3] ifupdown: clarify name of connections hash - -'iface_connections' is really the list of all NMIfupdownConnections -known to the plugin, read from /e/n/i and hashed by block name. Since -ifupdown doesn't store anything *except* connections from /e/n/i, -just rename it to 'connections' to reduce confusion with the -well_known_interfaces and well_known_ifaces hashes. ---- - src/settings/plugins/ifupdown/plugin.c | 46 +++++++++++++++----------------- - 1 file changed, 21 insertions(+), 25 deletions(-) - -diff --git a/src/settings/plugins/ifupdown/plugin.c b/src/settings/plugins/ifupdown/plugin.c -index 4dbb0aa..41eec9c 100644 ---- a/src/settings/plugins/ifupdown/plugin.c -+++ b/src/settings/plugins/ifupdown/plugin.c -@@ -73,7 +73,7 @@ - typedef struct { - GUdevClient *client; - -- GHashTable *iface_connections; -+ GHashTable *connections; /* /e/n/i block name :: NMIfupdownConnection */ - gchar* hostname; - - GHashTable *well_known_interfaces; -@@ -243,7 +243,7 @@ udev_device_added (SCPluginIfupdown *self, GUdevDevice *device) - /* if we have a configured connection for this particular iface - * we want to either unmanage the device or lock it - */ -- exported = (NMIfupdownConnection *) g_hash_table_lookup (priv->iface_connections, iface); -+ exported = g_hash_table_lookup (priv->connections, iface); - if (!exported && !g_hash_table_lookup (priv->well_known_interfaces, iface)) { - PLUGIN_PRINT("SCPlugin-Ifupdown", - "device added (path: %s, iface: %s): no ifupdown configuration found.", path, iface); -@@ -313,12 +313,15 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config) - GKeyFile* keyfile; - GError *error = NULL; - GList *keys, *iter; -+ GHashTableIter con_iter; -+ const char *block_name; -+ NMIfupdownConnection *connection; - const char *subsys[2] = { "net", NULL }; - - auto_ifaces = g_hash_table_new (g_str_hash, g_str_equal); - -- if(!priv->iface_connections) -- priv->iface_connections = g_hash_table_new (g_str_hash, g_str_equal); -+ if(!priv->connections) -+ priv->connections = g_hash_table_new (g_str_hash, g_str_equal); - - if(!priv->well_known_ifaces) - priv->well_known_ifaces = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); -@@ -399,18 +402,18 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config) - } - - /* Remove any connection for this block that was previously found */ -- exported = g_hash_table_lookup (priv->iface_connections, block->name); -+ exported = g_hash_table_lookup (priv->connections, block->name); - if (exported) { -- PLUGIN_PRINT("SCPlugin-Ifupdown", "deleting %s from iface_connections", block->name); -+ PLUGIN_PRINT("SCPlugin-Ifupdown", "deleting %s from connections", block->name); - nm_settings_connection_delete (NM_SETTINGS_CONNECTION (exported), ignore_cb, NULL); -- g_hash_table_remove (priv->iface_connections, block->name); -+ g_hash_table_remove (priv->connections, block->name); - } - - /* add the new connection */ - exported = nm_ifupdown_connection_new (block); - if (exported) { -- PLUGIN_PRINT("SCPlugin-Ifupdown", "adding %s to iface_connections", block->name); -- g_hash_table_insert (priv->iface_connections, block->name, exported); -+ PLUGIN_PRINT("SCPlugin-Ifupdown", "adding %s to connections", block->name); -+ g_hash_table_insert (priv->connections, block->name, exported); - } - PLUGIN_PRINT("SCPlugin-Ifupdown", "adding iface %s to well_known_interfaces", block->name); - g_hash_table_insert (priv->well_known_interfaces, block->name, "known"); -@@ -423,23 +426,16 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config) - } - - /* Make 'auto' interfaces autoconnect=TRUE */ -- keys = g_hash_table_get_keys (priv->iface_connections); -- for (iter = keys; iter; iter = g_list_next (iter)) { -- NMIfupdownConnection *exported; -+ g_hash_table_iter_init (&con_iter, priv->connections); -+ while (g_hash_table_iter_next (&con_iter, (gpointer) &block_name, (gpointer) &connection)) { - NMSettingConnection *setting; - -- if (!g_hash_table_lookup (auto_ifaces, iter->data)) -- continue; -- -- exported = g_hash_table_lookup (priv->iface_connections, iter->data); -- setting = nm_connection_get_setting_connection (NM_CONNECTION (exported)); -- g_object_set (setting, NM_SETTING_CONNECTION_AUTOCONNECT, TRUE, NULL); -- -- nm_settings_connection_commit_changes (NM_SETTINGS_CONNECTION (exported), ignore_cb, NULL); -- -- PLUGIN_PRINT("SCPlugin-Ifupdown", "autoconnect"); -+ if (g_hash_table_lookup (auto_ifaces, block_name)) { -+ setting = nm_connection_get_setting_connection (NM_CONNECTION (connection)); -+ g_object_set (setting, NM_SETTING_CONNECTION_AUTOCONNECT, TRUE, NULL); -+ PLUGIN_PRINT("SCPlugin-Ifupdown", "autoconnect"); -+ } - } -- g_list_free (keys); - g_hash_table_destroy (auto_ifaces); - - /* Read the config file to find out whether to manage interfaces */ -@@ -483,7 +479,7 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config) - - /* Now if we're running in managed mode, let NM know there are new connections */ - if (!priv->unmanage_well_known) { -- GList *con_list = g_hash_table_get_values (priv->iface_connections); -+ GList *con_list = g_hash_table_get_values (priv->connections); - GList *cl_iter; - - for (cl_iter = con_list; cl_iter; cl_iter = g_list_next (cl_iter)) { -@@ -516,7 +512,7 @@ SCPluginIfupdown_get_connections (NMSystemConfigInterface *config) - return NULL; - } - -- g_hash_table_iter_init (&iter, priv->iface_connections); -+ g_hash_table_iter_init (&iter, priv->connections); - while (g_hash_table_iter_next (&iter, NULL, &value)) - connections = g_slist_prepend (connections, value); - --- -1.7.10.4 - diff --git a/debian/patches/09-ifupdown-fix-naming-confusion-in-plugin-hash-tables.patch b/debian/patches/09-ifupdown-fix-naming-confusion-in-plugin-hash-tables.patch deleted file mode 100644 index b0576f6f..00000000 --- a/debian/patches/09-ifupdown-fix-naming-confusion-in-plugin-hash-tables.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 3dab0094b2296e07d8ccc3e80025b88a2f493f95 Mon Sep 17 00:00:00 2001 -From: Dan Williams <dcbw@redhat.com> -Date: Tue, 7 May 2013 15:22:55 -0500 -Subject: [PATCH 2/3] ifupdown: fix naming confusion in plugin hash tables - -well_known_interfaces -> eni_ifaces, since it's a hash of any -interfaces read from /etc/network/interfaces. - -well_known_ifaces -> kernel_ifaces, since it's a hash of any -network subsystem interface the kernel knows about ---- - src/settings/plugins/ifupdown/plugin.c | 48 ++++++++++++++++++-------------- - 1 file changed, 27 insertions(+), 21 deletions(-) - -diff --git a/src/settings/plugins/ifupdown/plugin.c b/src/settings/plugins/ifupdown/plugin.c -index 41eec9c..8c24b2c 100644 ---- a/src/settings/plugins/ifupdown/plugin.c -+++ b/src/settings/plugins/ifupdown/plugin.c -@@ -76,8 +76,14 @@ typedef struct { - GHashTable *connections; /* /e/n/i block name :: NMIfupdownConnection */ - gchar* hostname; - -- GHashTable *well_known_interfaces; -- GHashTable *well_known_ifaces; -+ /* Stores all blocks/interfaces read from /e/n/i regardless of whether -+ * there is an NMIfupdownConnection for block. -+ */ -+ GHashTable *eni_ifaces; -+ -+ /* Stores any network interfaces the kernel knows about */ -+ GHashTable *kernel_ifaces; -+ - gboolean unmanage_well_known; - char *conf_file; - -@@ -244,13 +250,13 @@ udev_device_added (SCPluginIfupdown *self, GUdevDevice *device) - * we want to either unmanage the device or lock it - */ - exported = g_hash_table_lookup (priv->connections, iface); -- if (!exported && !g_hash_table_lookup (priv->well_known_interfaces, iface)) { -+ if (!exported && !g_hash_table_lookup (priv->eni_ifaces, iface)) { - PLUGIN_PRINT("SCPlugin-Ifupdown", - "device added (path: %s, iface: %s): no ifupdown configuration found.", path, iface); - return; - } - -- g_hash_table_insert (priv->well_known_ifaces, g_strdup (iface), g_object_ref (device)); -+ g_hash_table_insert (priv->kernel_ifaces, g_strdup (iface), g_object_ref (device)); - - if (exported) - bind_device_to_connection (self, device, exported); -@@ -273,7 +279,7 @@ udev_device_removed (SCPluginIfupdown *self, GUdevDevice *device) - PLUGIN_PRINT("SCPlugin-Ifupdown", - "devices removed (path: %s, iface: %s)", path, iface); - -- if (!g_hash_table_remove (priv->well_known_ifaces, iface)) -+ if (!g_hash_table_remove (priv->kernel_ifaces, iface)) - return; - - if (ALWAYS_UNMANAGE || priv->unmanage_well_known) -@@ -323,11 +329,11 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config) - if(!priv->connections) - priv->connections = g_hash_table_new (g_str_hash, g_str_equal); - -- if(!priv->well_known_ifaces) -- priv->well_known_ifaces = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); -+ if(!priv->kernel_ifaces) -+ priv->kernel_ifaces = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); - -- if(!priv->well_known_interfaces) -- priv->well_known_interfaces = g_hash_table_new (g_str_hash, g_str_equal); -+ if(!priv->eni_ifaces) -+ priv->eni_ifaces = g_hash_table_new (g_str_hash, g_str_equal); - - PLUGIN_PRINT("SCPlugin-Ifupdown", "init!"); - -@@ -387,8 +393,8 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config) - continue; - } - if (state == 0 && strlen (token) > 0) { -- PLUGIN_PRINT("SCPlugin-Ifupdown", "adding bridge port %s to well_known_interfaces", token); -- g_hash_table_insert (priv->well_known_interfaces, g_strdup (token), "known"); -+ PLUGIN_PRINT("SCPlugin-Ifupdown", "adding bridge port %s to eni_ifaces", token); -+ g_hash_table_insert (priv->eni_ifaces, g_strdup (token), "known"); - } - } - g_strfreev (port_ifaces); -@@ -415,11 +421,11 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config) - PLUGIN_PRINT("SCPlugin-Ifupdown", "adding %s to connections", block->name); - g_hash_table_insert (priv->connections, block->name, exported); - } -- PLUGIN_PRINT("SCPlugin-Ifupdown", "adding iface %s to well_known_interfaces", block->name); -- g_hash_table_insert (priv->well_known_interfaces, block->name, "known"); -+ PLUGIN_PRINT("SCPlugin-Ifupdown", "adding iface %s to eni_ifaces", block->name); -+ g_hash_table_insert (priv->eni_ifaces, block->name, "known"); - } else if (!strcmp ("mapping", block->type)) { -- g_hash_table_insert (priv->well_known_interfaces, block->name, "known"); -- PLUGIN_PRINT("SCPlugin-Ifupdown", "adding mapping %s to well_known_interfaces", block->name); -+ g_hash_table_insert (priv->eni_ifaces, block->name, "known"); -+ PLUGIN_PRINT("SCPlugin-Ifupdown", "adding mapping %s to eni_ifaces", block->name); - } - next: - block = block->next; -@@ -537,9 +543,9 @@ SCPluginIfupdown_get_unmanaged_specs (NMSystemConfigInterface *config) - return NULL; - - PLUGIN_PRINT("Ifupdown", "get unmanaged devices count: %d", -- g_hash_table_size (priv->well_known_ifaces)); -+ g_hash_table_size (priv->kernel_ifaces)); - -- g_hash_table_iter_init (&iter, priv->well_known_ifaces); -+ g_hash_table_iter_init (&iter, priv->kernel_ifaces); - while (g_hash_table_iter_next (&iter, NULL, &value)) { - GUdevDevice *device = G_UDEV_DEVICE (value); - const char *address; -@@ -685,11 +691,11 @@ GObject__dispose (GObject *object) - if (priv->inotify_system_hostname_wd >= 0) - nm_inotify_helper_remove_watch (inotify_helper, priv->inotify_system_hostname_wd); - -- if (priv->well_known_ifaces) -- g_hash_table_destroy(priv->well_known_ifaces); -+ if (priv->kernel_ifaces) -+ g_hash_table_destroy(priv->kernel_ifaces); - -- if (priv->well_known_interfaces) -- g_hash_table_destroy(priv->well_known_interfaces); -+ if (priv->eni_ifaces) -+ g_hash_table_destroy(priv->eni_ifaces); - - g_free (priv->conf_file); - --- -1.7.10.4 - diff --git a/debian/patches/10-ifupdown-recalculate-unmanaged-specs-on-interface-ch.patch b/debian/patches/10-ifupdown-recalculate-unmanaged-specs-on-interface-ch.patch deleted file mode 100644 index 4c2b2fc8..00000000 --- a/debian/patches/10-ifupdown-recalculate-unmanaged-specs-on-interface-ch.patch +++ /dev/null @@ -1,58 +0,0 @@ -From e2941724ba71096d11897d2e191efc4c415eacb3 Mon Sep 17 00:00:00 2001 -From: Dan Williams <dcbw@redhat.com> -Date: Tue, 7 May 2013 15:33:59 -0500 -Subject: [PATCH 3/3] ifupdown: recalculate unmanaged specs on interface - change (debian #707070) - -If a kernel interface changes its MAC address, and NM is not -supposed to manage that interface, ifupdown needs to notice -that MAC address change and tell NM that the unmanaged devices -have changed, so that NM continues to not touch the device -after the MAC has changed. ---- - src/settings/plugins/ifupdown/plugin.c | 22 ++++++++++++++++++++++ - 1 file changed, 22 insertions(+) - -diff --git a/src/settings/plugins/ifupdown/plugin.c b/src/settings/plugins/ifupdown/plugin.c -index 8c24b2c..a46ea2e 100644 ---- a/src/settings/plugins/ifupdown/plugin.c -+++ b/src/settings/plugins/ifupdown/plugin.c -@@ -287,6 +287,26 @@ udev_device_removed (SCPluginIfupdown *self, GUdevDevice *device) - } - - static void -+udev_device_changed (SCPluginIfupdown *self, GUdevDevice *device) -+{ -+ SCPluginIfupdownPrivate *priv = SC_PLUGIN_IFUPDOWN_GET_PRIVATE (self); -+ const char *iface, *path; -+ -+ iface = g_udev_device_get_name (device); -+ path = g_udev_device_get_sysfs_path (device); -+ if (!iface || !path) -+ return; -+ -+ PLUGIN_PRINT("SCPlugin-Ifupdown", "device changed (path: %s, iface: %s)", path, iface); -+ -+ if (!g_hash_table_lookup (priv->kernel_ifaces, iface)) -+ return; -+ -+ if (ALWAYS_UNMANAGE || priv->unmanage_well_known) -+ g_signal_emit_by_name (G_OBJECT (self), NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED); -+} -+ -+static void - handle_uevent (GUdevClient *client, - const char *action, - GUdevDevice *device, -@@ -306,6 +326,8 @@ handle_uevent (GUdevClient *client, - udev_device_added (self, device); - else if (!strcmp (action, "remove")) - udev_device_removed (self, device); -+ else if (!strcmp (action, "change")) -+ udev_device_changed (self, device); - } - - static void --- -1.7.10.4 - diff --git a/debian/patches/series b/debian/patches/series index e4ca5cb5..1eef0c6e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,8 +1,3 @@ 02-dbus_access_network_manager.patch 03-systemd.patch 05-force-online-with-unmanaged-devices.patch -06-tear-down-connections-for-unavailable-devices.patch -07-duid-fallback.patch -08-ifupdown-clarify-name-of-connections-hash.patch -09-ifupdown-fix-naming-confusion-in-plugin-hash-tables.patch -10-ifupdown-recalculate-unmanaged-specs-on-interface-ch.patch |