summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2017-11-29 17:13:33 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2017-11-29 17:13:33 +0100
commitde4cd2a93b9d7236eb6089ea1d6d9a86f981313e (patch)
treebc4b873349180e28a291959fadd44ba48461f462
parentbb86b9bc06d9df74305434406004f7602e80f341 (diff)
downloadNetworkManager-bg/ifcfg-rh-dns-rh1517794.tar.gz
fixup! ifcfg-rh: only open network file once when parsing connectionbg/ifcfg-rh-dns-rh1517794
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
index 963cd0567e..f3f62bd8db 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
@@ -1856,7 +1856,8 @@ make_ip6_setting (shvarFile *ifcfg,
value = svGetValueStr_cp (ifcfg, "IPV6_DEFAULTGW");
if (!value) {
/* If no gateway in the ifcfg, try global /etc/sysconfig/network instead */
- value = svGetValueStr_cp (network_ifcfg, "IPV6_DEFAULTGW");
+ if (network_ifcfg)
+ value = svGetValueStr_cp (network_ifcfg, "IPV6_DEFAULTGW");
}
if (value) {
char *ptr;