From 5e827aae48d2335c847f3029e0c9bdbd846924ca Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sat, 4 Dec 2010 17:00:19 +0100 Subject: Do not require a valid connection for devices to be marked unmanaged. * debian/patches/40-umanaged-interfaces.patch - For devices to be marked unmanaged, do not require a valid connection configuration. (Closes: #569215) --- debian/changelog | 8 ++++++++ debian/patches/40-umanaged-interfaces.patch | 28 ++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 37 insertions(+) create mode 100644 debian/patches/40-umanaged-interfaces.patch (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 11dbc923..3afda83f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +network-manager (0.8.1-6) UNRELEASED; urgency=low + + * debian/patches/40-umanaged-interfaces.patch + - For devices to be marked unmanaged, do not require a valid connection + configuration. (Closes: #569215) + + -- Michael Biebl Thu, 02 Dec 2010 01:47:35 +0100 + network-manager (0.8.1-5) unstable; urgency=low * Update Vcs-* fields: Move packaging from svn to git. diff --git a/debian/patches/40-umanaged-interfaces.patch b/debian/patches/40-umanaged-interfaces.patch new file mode 100644 index 00000000..b5509fc5 --- /dev/null +++ b/debian/patches/40-umanaged-interfaces.patch @@ -0,0 +1,28 @@ +Index: network-manager/system-settings/plugins/ifupdown/plugin.c +=================================================================== +--- network-manager.orig/system-settings/plugins/ifupdown/plugin.c 2010-12-03 20:47:40.656731988 +0100 ++++ network-manager/system-settings/plugins/ifupdown/plugin.c 2010-12-04 16:41:38.258906974 +0100 +@@ -366,6 +366,7 @@ + /* Remove any connection for this block that was previously found */ + exported = g_hash_table_lookup (priv->iface_connections, block->name); + if (exported) { ++ PLUGIN_PRINT("SCPlugin-Ifupdown", "deleting %s from iface_connections", block->name); + nm_settings_connection_interface_delete (NM_SETTINGS_CONNECTION_INTERFACE (exported), + ignore_cb, + NULL); +@@ -375,11 +376,14 @@ + /* 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); +- g_hash_table_insert (priv->well_known_interfaces, block->name, "known"); + } ++ PLUGIN_PRINT("SCPlugin-Ifupdown", "adding iface %s to well_known_interfaces", block->name); ++ g_hash_table_insert (priv->well_known_interfaces, 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); + } + block = block->next; + } diff --git a/debian/patches/series b/debian/patches/series index 365331c3..cdd5044b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ 02-dbus_access_network_manager.patch 10-dont_require_ifup_for_lo.patch 30-typo_fix.patch +40-umanaged-interfaces.patch -- cgit 1.3.0-6-gf8a5 From b335f6b21d418ac72816e9f6659ebc40fad4b120 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sat, 4 Dec 2010 17:11:08 +0100 Subject: Allow to unmanage bridge ports * debian/patches/50-bridge-interfaces.patch - Parse bridge configurations in /etc/network/interfaces and add interfaces defined via bridge_ports to well_known_interfaces. This allows to mark those interfaces as unmanaged if managed=false. The "all" keyword and regexes are not supported and simply skipped. (Closes: #530335) --- debian/changelog | 6 +++ debian/patches/50-bridge-interfaces.patch | 63 +++++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 70 insertions(+) create mode 100644 debian/patches/50-bridge-interfaces.patch (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 3afda83f..239b187a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,12 @@ network-manager (0.8.1-6) UNRELEASED; urgency=low * debian/patches/40-umanaged-interfaces.patch - For devices to be marked unmanaged, do not require a valid connection configuration. (Closes: #569215) + * debian/patches/50-bridge-interfaces.patch + - Parse bridge configurations in /etc/network/interfaces and add + interfaces defined via bridge_ports to well_known_interfaces. This + allows to mark those interfaces as unmanaged if managed=false. + The "all" keyword and regexes are not supported and simply skipped. + (Closes: #530335) -- Michael Biebl Thu, 02 Dec 2010 01:47:35 +0100 diff --git a/debian/patches/50-bridge-interfaces.patch b/debian/patches/50-bridge-interfaces.patch new file mode 100644 index 00000000..f58ba5d7 --- /dev/null +++ b/debian/patches/50-bridge-interfaces.patch @@ -0,0 +1,63 @@ +Index: network-manager/system-settings/plugins/ifupdown/plugin.c +=================================================================== +--- network-manager.orig/system-settings/plugins/ifupdown/plugin.c 2010-12-04 16:41:38.000000000 +0100 ++++ network-manager/system-settings/plugins/ifupdown/plugin.c 2010-12-04 16:51:51.810906877 +0100 +@@ -360,9 +360,49 @@ + while (block) { + if(!strcmp ("auto", block->type) || !strcmp ("allow-hotplug", block->type)) + g_hash_table_insert (auto_ifaces, block->name, GUINT_TO_POINTER (1)); +- else if (!strcmp ("iface", block->type) && strcmp ("lo", block->name)) { ++ else if (!strcmp ("iface", block->type)) { + NMIfupdownConnection *exported; + ++ /* Bridge configuration */ ++ if(!strncmp ("br", block->name, 2)) { ++ /* Try to find bridge ports */ ++ const char *ports = ifparser_getkey (block, "bridge_ports"); ++ if (ports) { ++ PLUGIN_PRINT("SCPlugin-Ifupdown", "found bridge ports %s for %s", ports, block->name); ++ char **port_ifaces = g_strsplit_set (ports, " \t", -1); ++ ++ int i; ++ int state = 0; ++ for (i = 0; i < g_strv_length (port_ifaces); i++) { ++ char *token = port_ifaces[i]; ++ /* Skip crazy stuff like regex or all */ ++ if (!strcmp ("all", token)) { ++ continue; ++ } ++ /* Small SM to skip everything inside regex */ ++ if (!strcmp ("regex", token)) { ++ state++; ++ continue; ++ } ++ if (!strcmp ("noregex", token)) { ++ state--; ++ 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"); ++ } ++ } ++ g_strfreev (port_ifaces); ++ } ++ goto next; ++ } ++ ++ /* Skip loopback configuration */ ++ if(!strcmp ("lo", block->name)) { ++ goto next; ++ } ++ + /* Remove any connection for this block that was previously found */ + exported = g_hash_table_lookup (priv->iface_connections, block->name); + if (exported) { +@@ -385,6 +425,7 @@ + g_hash_table_insert (priv->well_known_interfaces, block->name, "known"); + PLUGIN_PRINT("SCPlugin-Ifupdown", "adding mapping %s to well_known_interfaces", block->name); + } ++ next: + block = block->next; + } + diff --git a/debian/patches/series b/debian/patches/series index cdd5044b..012269a9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ 10-dont_require_ifup_for_lo.patch 30-typo_fix.patch 40-umanaged-interfaces.patch +50-bridge-interfaces.patch -- cgit 1.3.0-6-gf8a5 From 44eff6984a48b7ef12115ab6f06c1199f969efcc Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sat, 4 Dec 2010 17:11:28 +0100 Subject: Release version 0.8.1-6 to unstable --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 239b187a..46daaec4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -network-manager (0.8.1-6) UNRELEASED; urgency=low +network-manager (0.8.1-6) unstable; urgency=low * debian/patches/40-umanaged-interfaces.patch - For devices to be marked unmanaged, do not require a valid connection @@ -10,7 +10,7 @@ network-manager (0.8.1-6) UNRELEASED; urgency=low The "all" keyword and regexes are not supported and simply skipped. (Closes: #530335) - -- Michael Biebl Thu, 02 Dec 2010 01:47:35 +0100 + -- Michael Biebl Sat, 04 Dec 2010 17:11:13 +0100 network-manager (0.8.1-5) unstable; urgency=low -- cgit 1.3.0-6-gf8a5