ifcfg-rh: avoid parsing the IPV6_PRIVACY string twice

This saves a couple of CPU cycles that would be better used for
something more useful, such as looking for transmissions from aliens.
This commit is contained in:
Lubomir Rintel 2016-10-13 13:24:36 +00:00
parent 577ba42e18
commit 2e8f40f2c9

View file

@ -1477,7 +1477,7 @@ make_ip6_setting (shvarFile *ifcfg,
/* Read IPv6 Privacy Extensions configuration */
str_value = svGetValueString (ifcfg, "IPV6_PRIVACY");
if (str_value) {
ip6_privacy = svGetValueBoolean (ifcfg, "IPV6_PRIVACY", FALSE);
ip6_privacy = svParseBoolean (str_value, FALSE);
if (!ip6_privacy)
ip6_privacy = (g_strcmp0 (str_value, "rfc4941") == 0) ||
(g_strcmp0 (str_value, "rfc3041") == 0);