[yast-commit] r67079 - /branches/SuSE-Code-11-SP2-Branch/yast2/library/network/src/NetworkInterfaces.ycp
Author: jreidinger Date: Mon Jan 2 17:57:49 2012 New Revision: 67079 URL: http://svn.opensuse.org/viewcvs/yast?rev=67079&view=rev Log: forbid append to ip adrress additional suffix ( original IPADDR have precedence). So no longer any 128.1.0.100/32/24. (bnc#735109) Modified: branches/SuSE-Code-11-SP2-Branch/yast2/library/network/src/NetworkInterfaces.ycp Modified: branches/SuSE-Code-11-SP2-Branch/yast2/library/network/src/NetworkInterfaces.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/yast2/library/network/src/NetworkInterfaces.ycp?rev=67079&r1=67078&r2=67079&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/yast2/library/network/src/NetworkInterfaces.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/yast2/library/network/src/NetworkInterfaces.ycp Mon Jan 2 17:57:49 2012 @@ -758,19 +758,21 @@ string p = ".network.value.\"" + config + "\"."; - if (size(devmap["IPADDR"]:"")>0 && size(devmap["NETMASK"]:"")>0){ - devmap["IPADDR"] = sformat("%1/%2", devmap["IPADDR"]:"", Netmask::ToBits(devmap["NETMASK"]:"")); - devmap=remove(devmap, "NETMASK"); - //TODO : delete NETMASK from config file - } else { - if (size(devmap["IPADDR"]:"")>0 && size(devmap["PREFIXLEN"]:"")>0){ - devmap["IPADDR"] = sformat("%1/%2", devmap["IPADDR"]:"", devmap["PREFIXLEN"]:""); - devmap=remove(devmap, "PREFIXLEN"); - //TODO : delete PREFIXLEN from config file - } + if (size(devmap["IPADDR"]:"")>0 && find(devmap["IPADDR"]:"","/") == -1) + { + if (size(devmap["IPADDR"]:"")>0 && size(devmap["NETMASK"]:"")>0){ + devmap["IPADDR"] = sformat("%1/%2", devmap["IPADDR"]:"", Netmask::ToBits(devmap["NETMASK"]:"")); + devmap=remove(devmap, "NETMASK"); + //TODO : delete NETMASK from config file + } else { + if (size(devmap["IPADDR"]:"")>0 && size(devmap["PREFIXLEN"]:"")>0){ + devmap["IPADDR"] = sformat("%1/%2", devmap["IPADDR"]:"", devmap["PREFIXLEN"]:""); + devmap=remove(devmap, "PREFIXLEN"); + //TODO : delete PREFIXLEN from config file + } + } } - /* write all keys to config */ maplist(string k, (list<string>) Map::Keys(devmap), { /* Write aliases */ -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jreidinger@svn2.opensuse.org