From 4f3a9cca6f49b471b2843cbe50ad3737105c7d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Mon, 11 Nov 2013 17:35:07 +0100 Subject: ifcfg-rh: do not un-escape value in TEAM_CONFIG, TEAM_PORT_CONFIG Doing so may cause NetworkManager to run into an very intensive loop in svUnescape() in shvar.c. This is 'top' output for very long (invalid team config) - 9309865 bytes long: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 26855 root 20 0 305m 35m 6092 R 99.8 0.9 8:08.11 NetworkManager and still not finished. --- src/settings/plugins/ifcfg-rh/reader.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugins/ifcfg-rh/reader.c index 325bee6c8c..e923eaab2d 100644 --- a/src/settings/plugins/ifcfg-rh/reader.c +++ b/src/settings/plugins/ifcfg-rh/reader.c @@ -4193,7 +4193,7 @@ make_team_setting (shvarFile *ifcfg, s_team = NM_SETTING_TEAM (nm_setting_team_new ()); - value = svGetValue (ifcfg, "DEVICE", FALSE); + value = svGetValue (ifcfg, "DEVICE", TRUE); if (!value || !strlen (value)) { g_set_error (error, IFCFG_PLUGIN_ERROR, 0, "mandatory DEVICE keyword missing"); goto error; @@ -4202,7 +4202,7 @@ make_team_setting (shvarFile *ifcfg, g_object_set (s_team, NM_SETTING_TEAM_INTERFACE_NAME, value, NULL); g_free (value); - value = svGetValue (ifcfg, "TEAM_CONFIG", FALSE); + value = svGetValue (ifcfg, "TEAM_CONFIG", TRUE); if (value) { g_object_set (s_team, NM_SETTING_TEAM_CONFIG, value, NULL); g_free (value); @@ -4496,7 +4496,7 @@ make_team_port_setting (shvarFile *ifcfg) NMSetting *s_port = NULL; char *value; - value = svGetValue (ifcfg, "TEAM_PORT_CONFIG", FALSE); + value = svGetValue (ifcfg, "TEAM_PORT_CONFIG", TRUE); if (value) { s_port = nm_setting_team_port_new (); g_object_set (s_port, NM_SETTING_TEAM_PORT_CONFIG, value, NULL); -- cgit v1.2.1