mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-05 18:56:51 -05:00
Fix improper error return in virInterfaceDefParseProtoIPvX
* src/conf/interface_conf.c: the code was erronously returning -1 in the two functions if <dhcp> is not provided
This commit is contained in:
committed by
Daniel Veillard
parent
468439854b
commit
af1e2ede26
@@ -310,10 +310,11 @@ virInterfaceDefParseProtoIPv4(virConnectPtr conn, virInterfaceProtocolDefPtr def
|
||||
def->gateway = tmp;
|
||||
|
||||
dhcp = virXPathNode(conn, "./dhcp", ctxt);
|
||||
if (dhcp != NULL)
|
||||
if (dhcp != NULL) {
|
||||
ret = virInterfaceDefParseDhcp(conn, def, dhcp, ctxt);
|
||||
if (ret != 0)
|
||||
return(ret);
|
||||
if (ret != 0)
|
||||
return(ret);
|
||||
}
|
||||
|
||||
nIpNodes = virXPathNodeSet(conn, "./ip", ctxt, &ipNodes);
|
||||
if (ipNodes == NULL)
|
||||
@@ -366,10 +367,11 @@ virInterfaceDefParseProtoIPv6(virConnectPtr conn, virInterfaceProtocolDefPtr def
|
||||
def->autoconf = 1;
|
||||
|
||||
dhcp = virXPathNode(conn, "./dhcp", ctxt);
|
||||
if (dhcp != NULL)
|
||||
if (dhcp != NULL) {
|
||||
ret = virInterfaceDefParseDhcp(conn, def, dhcp, ctxt);
|
||||
if (ret != 0)
|
||||
return(ret);
|
||||
if (ret != 0)
|
||||
return(ret);
|
||||
}
|
||||
|
||||
nIpNodes = virXPathNodeSet(conn, "./ip", ctxt, &ipNodes);
|
||||
if (ipNodes == NULL)
|
||||
|
||||
Reference in New Issue
Block a user