[yast-commit] r40526 - in /trunk/yast2: library/network/src/SuSEFirewall.ycp package/yast2.changes
Author: locilka Date: Tue Aug 28 12:16:25 2007 New Revision: 40526 URL: http://svn.opensuse.org/viewcvs/yast?rev=40526&view=rev Log: - Fixed SuSEFirewall to better handle erroneous data from NetworkDevices module (#303858). Modified: trunk/yast2/library/network/src/SuSEFirewall.ycp trunk/yast2/package/yast2.changes Modified: trunk/yast2/library/network/src/SuSEFirewall.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/network/src/SuSEFirewall.ycp?rev=40526&r1=40525&r2=40526&view=diff ============================================================================== --- trunk/yast2/library/network/src/SuSEFirewall.ycp (original) +++ trunk/yast2/library/network/src/SuSEFirewall.ycp Tue Aug 28 12:16:25 2007 @@ -1472,15 +1472,37 @@ // All dial-up interfaces list <string> dialup_interfaces = NetworkDevices::List("dialup"); - dialup_interfaces = filter(string interface, dialup_interfaces, ``{ - return interface != "" && !issubstring(interface, "lo") && !issubstring(interface, "sit"); + if (dialup_interfaces == nil) dialup_interfaces = []; + + // bugzilla #303858 - wrong values from NetworkDevices + dialup_interfaces = filter (string one_iface, dialup_interfaces, { + if (one_iface == nil || one_iface == "") { + y2error ("Wrong interface definition '%1'", one_iface); + return false; + } + return true; + }); + + dialup_interfaces = filter (string interface, dialup_interfaces, ``{ + return interface != "" && !issubstring (interface, "lo") && !issubstring (interface, "sit"); }); // All non-dial-up interfaces list <string> non_dialup_interfaces = NetworkDevices::List(""); - non_dialup_interfaces = filter(string interface, non_dialup_interfaces, ``{ - return interface != "" && !issubstring(interface, "lo") && !issubstring(interface, "sit") - && !contains(dialup_interfaces, interface); + if (non_dialup_interfaces == nil) non_dialup_interfaces = []; + + // bugzilla #303858 - wrong values from NetworkDevices + non_dialup_interfaces = filter (string one_iface, non_dialup_interfaces, { + if (one_iface == nil || one_iface == "") { + y2error ("Wrong interface definition '%1'", one_iface); + return false; + } + return true; + }); + + non_dialup_interfaces = filter (string interface, non_dialup_interfaces, ``{ + return interface != "" && !issubstring (interface, "lo") && !issubstring (interface, "sit") + && !contains (dialup_interfaces, interface); }); foreach (string interface, dialup_interfaces, { Modified: trunk/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=40526&r1=40525&r2=40526&view=diff ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Tue Aug 28 12:16:25 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Aug 28 12:12:49 CEST 2007 - locilka@suse.cz + +- Fixed SuSEFirewall to better handle erroneous data from + NetworkDevices module (#303858). + +------------------------------------------------------------------- Mon Aug 27 11:59:50 CEST 2007 - sh@suse.de - Fixed bug #304776: save_y2logs usage message -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
locilka@svn.opensuse.org