Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 932423 Details for
Bug 1135017
ifcfg-rh: missing STP in bridge ifcfg file should be treated as STP=no
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
[PATCH] RHEL6 patch fixing the STP issue
0001-ifcfg-rh-ensure-missing-STP-property-is-interpreted-.patch (text/plain), 7.81 KB, created by
Jirka Klimes
on 2014-08-28 17:26:36 UTC
(
hide
)
Description:
[PATCH] RHEL6 patch fixing the STP issue
Filename:
MIME Type:
Creator:
Jirka Klimes
Created:
2014-08-28 17:26:36 UTC
Size:
7.81 KB
patch
obsolete
>From 79675603571a5cae749d916dd3f6f0cd5ab877eb Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@redhat.com> >Date: Thu, 28 Aug 2014 18:41:19 +0200 >Subject: [PATCH 1/2] ifcfg-rh: ensure missing STP property is interpreted as > "off" (rh #1135017) >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Resolves: #1135017 > >Signed-off-by: JiÅà KlimeÅ¡ <jklimes@redhat.com> >--- > NetworkManager.spec | 7 +- > rh1135017-ifcfgrh-bridge-stp-read-fix.patch | 150 ++++++++++++++++++++++++++++ > 2 files changed, 156 insertions(+), 1 deletion(-) > create mode 100644 rh1135017-ifcfgrh-bridge-stp-read-fix.patch > >diff --git a/NetworkManager.spec b/NetworkManager.spec >index 63556e0..e81c3f6 100644 >--- a/NetworkManager.spec >+++ b/NetworkManager.spec >@@ -17,7 +17,7 @@ Name: NetworkManager > Summary: Network connection manager and user applications > Epoch: 1 > Version: 0.8.1 >-Release: 76%{?dist} >+Release: 77%{?dist} > Group: System Environment/Base > License: GPLv2+ > URL: http://www.gnome.org/projects/NetworkManager/ >@@ -136,6 +136,7 @@ Patch113: rh1112505-applet-fix-ifname-display.patch > Patch114: rh1113996-ifcfg-rh-writer-ip4-fix.patch > Patch115: rh1111672-ifcfg-rh-routes-no-gateway.patch > Patch116: rh1111664-dbus-add-connection-return.patch >+Patch117: rh1135017-ifcfgrh-bridge-stp-read-fix.patch > > BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) > >@@ -381,6 +382,7 @@ tar -xjf %{SOURCE1} > %patch114 -p1 -b .rh1113996-ifcfg-rh-writer-ip4-fix > %patch115 -p1 -b .rh1111672-ifcfg-rh-routes-no-gateway > %patch116 -p1 -b .rh1111664-dbus-add-connection-return >+%patch117 -p1 -b .rh1135017-ifcfgrh-bridge-stp-read-fix > > %build > >@@ -614,6 +616,9 @@ fi > %{_datadir}/gtk-doc/html/libnm-util/* > > %changelog >+* Thu Aug 28 2014 JiÅà KlimeÅ¡ <jklimes@redhat.com> - 1:0.8.1-77 >+- ifcfg-rh: ensure missing STP property is interpreted as "off" (rh #1135017) >+ > * Mon Aug 25 2014 JiÅà KlimeÅ¡ <jklimes@redhat.com> - 1:0.8.1-76 > - ifcfg-rh: allow missing and 0.0.0.0 GATEWAYn lines in ifcfg-routes (rh #1111672) > - core: add AddConnectionReturn() method to system settings service (rh #1111664) >diff --git a/rh1135017-ifcfgrh-bridge-stp-read-fix.patch b/rh1135017-ifcfgrh-bridge-stp-read-fix.patch >new file mode 100644 >index 0000000..67c4598 >--- /dev/null >+++ b/rh1135017-ifcfgrh-bridge-stp-read-fix.patch >@@ -0,0 +1,150 @@ >+From 360a02fc13635f3d1ff44129ca9d5a8cf7cea2b9 Mon Sep 17 00:00:00 2001 >+From: Dan Williams <dcbw@redhat.com> >+Date: Fri, 22 Mar 2013 09:13:12 -0500 >+Subject: [PATCH] ifcfg-rh: ensure missing STP property is interpreted as >+ "off" (rh #922702) >+MIME-Version: 1.0 >+Content-Type: text/plain; charset=UTF-8 >+Content-Transfer-Encoding: 8bit >+ >+The initscripts interpreted it this way, so we do too. >+ >+https://bugzilla.redhat.com/show_bug.cgi?id=922702 >+https://bugzilla.redhat.com/show_bug.cgi?id=1135017 >+ >+Signed-off-by: JiÅà KlimeÅ¡ <jklimes@redhat.com> >+ >+(cherry picked from commit 360a02fc13635f3d1ff44129ca9d5a8cf7cea2b9) >+--- >+ system-settings/plugins/ifcfg-rh/reader.c | 12 +++++-- >+ .../ifcfg-rh/tests/network-scripts/Makefile.am | 1 + >+ .../network-scripts/ifcfg-test-bridge-missing-stp | 5 +++ >+ .../plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 42 ++++++++++++++++++++++ >+ 4 files changed, 58 insertions(+), 2 deletions(-) >+ create mode 100644 system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bridge-missing-stp >+ >+diff --git a/system-settings/plugins/ifcfg-rh/reader.c b/system-settings/plugins/ifcfg-rh/reader.c >+index 8c4825b..2832b06 100644 >+--- a/system-settings/plugins/ifcfg-rh/reader.c >++++ b/system-settings/plugins/ifcfg-rh/reader.c >+@@ -3845,6 +3845,7 @@ make_bridge_setting (shvarFile *ifcfg, >+ char *value; >+ guint32 u; >+ gboolean stp = FALSE; >++ gboolean stp_set = FALSE; >+ >+ s_bridge = NM_SETTING_BRIDGE (nm_setting_bridge_new ()); >+ >+@@ -3862,13 +3863,20 @@ make_bridge_setting (shvarFile *ifcfg, >+ if (!strcasecmp (value, "on") || !strcasecmp (value, "yes")) { >+ g_object_set (s_bridge, NM_SETTING_BRIDGE_STP, TRUE, NULL); >+ stp = TRUE; >+- } else if (!strcasecmp (value, "off") || !strcasecmp (value, "no")) >++ stp_set = TRUE; >++ } else if (!strcasecmp (value, "off") || !strcasecmp (value, "no")) { >+ g_object_set (s_bridge, NM_SETTING_BRIDGE_STP, FALSE, NULL); >+- else >++ stp_set = TRUE; >++ } else >+ PLUGIN_WARN (IFCFG_PLUGIN_NAME, " warning: invalid STP value '%s'", value); >+ g_free (value); >+ } >+ >++ if (!stp_set) { >++ /* Missing or invalid STP property means "no" */ >++ g_object_set (s_bridge, NM_SETTING_BRIDGE_STP, FALSE, NULL); >++ } >++ >+ value = svGetValue (ifcfg, "DELAY", FALSE); >+ if (value) { >+ if (stp) { >+diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am b/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am >+index f1a9538..0362ce3 100644 >+--- a/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am >++++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am >+@@ -70,6 +70,7 @@ EXTRA_DIST = \ >+ ifcfg-test-wired-ctc-static \ >+ ifcfg-test-bridge-main \ >+ ifcfg-test-bridge-component \ >++ ifcfg-test-bridge-missing-stp \ >+ ifcfg-test-vlan-interface \ >+ ifcfg-test-vlan-only-vlanid \ >+ ifcfg-test-vlan-only-device \ >+diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bridge-missing-stp b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bridge-missing-stp >+new file mode 100644 >+index 0000000..7135cd4 >+--- /dev/null >++++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bridge-missing-stp >+@@ -0,0 +1,5 @@ >++DEVICE=br0 >++ONBOOT=no >++TYPE=Bridge >++BOOTPROTO=dhcp >++ >+diff --git a/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c >+index e7f7e2f..106db94 100644 >+--- a/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c >++++ b/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c >+@@ -10806,6 +10806,46 @@ test_write_infiniband (void) >+ g_object_unref (reread); >+ } >+ >++static void >++test_read_bridge_missing_stp (void) >++{ >++ NMConnection *connection; >++ NMSettingBridge *s_bridge; >++ char *unmanaged = NULL; >++ char *keyfile = NULL; >++ char *routefile = NULL; >++ char *route6file = NULL; >++ gboolean ignore_error = FALSE; >++ GError *error = NULL; >++ >++ connection = connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-bridge-missing-stp", >++ NULL, >++ TYPE_BRIDGE, >++ NULL, >++ &unmanaged, >++ &keyfile, >++ &routefile, >++ &route6file, >++ &error, >++ &ignore_error); >++ g_assert (connection); >++ g_assert (nm_connection_verify (connection, &error)); >++ g_assert_no_error (error); >++ >++ /* ===== Bridging SETTING ===== */ >++ >++ s_bridge = nm_connection_get_setting_bridge (connection); >++ g_assert (s_bridge); >++ g_assert_cmpstr (nm_setting_bridge_get_interface_name (s_bridge), ==, "br0"); >++ g_assert_cmpuint (nm_setting_bridge_get_stp (s_bridge), ==, FALSE); >++ >++ g_free (unmanaged); >++ g_free (keyfile); >++ g_free (routefile); >++ g_free (route6file); >++ g_object_unref (connection); >++} >++ >+ #define TEST_IFCFG_VLAN_INTERFACE TEST_IFCFG_DIR"/network-scripts/ifcfg-test-vlan-interface" >+ >+ static void >+@@ -11569,10 +11609,12 @@ int main (int argc, char **argv) >+ test_write_bond_main (); >+ test_write_bond_slave (); >+ >++ /* bridging */ >+ test_read_bridge_main (); >+ test_write_bridge_main (); >+ test_read_bridge_component (); >+ test_write_bridge_component (); >++ test_read_bridge_missing_stp (); >+ >+ /* Stuff we expect to fail for now */ >+ test_write_wired_pppoe (); >+-- >+1.7.11.7 >+ >-- >1.7.11.7 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1135017
: 932423