mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
Maintain value of ctxt->node in virInterfaceDefParseDhcp
* src/conf/interface_conf.c: This was causing subsequent calls to virXPathxxx() to fail, since ctxt->node was left pointing at the dhcp node, rather than the protocol node.
This commit is contained in:
parent
237f3bf8da
commit
c93370c4ad
@ -227,10 +227,12 @@ virInterfaceDefParseBondArpValid(virConnectPtr conn, xmlXPathContextPtr ctxt) {
|
||||
static int
|
||||
virInterfaceDefParseDhcp(virConnectPtr conn, virInterfaceDefPtr def,
|
||||
xmlNodePtr dhcp, xmlXPathContextPtr ctxt) {
|
||||
xmlNodePtr save;
|
||||
char *tmp;
|
||||
int ret = 0;
|
||||
|
||||
def->proto.dhcp = 1;
|
||||
save = ctxt->node;
|
||||
ctxt->node = dhcp;
|
||||
/* Not much to do in the current version */
|
||||
tmp = virXPathString(conn, "string(./@peerdns)", ctxt);
|
||||
@ -248,6 +250,7 @@ virInterfaceDefParseDhcp(virConnectPtr conn, virInterfaceDefPtr def,
|
||||
} else
|
||||
def->proto.peerdns = -1;
|
||||
|
||||
ctxt->node = save;
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user