Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> --- src/conf/domain_conf.c | 17 +++++++++-------- src/conf/domain_conf.h | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 014f318dcd..8e94860b51 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -10551,14 +10551,15 @@ virDomainActualNetDefParseXML(xmlNodePtr node, goto error; } - trustGuestRxFilters = virXMLPropString(node, "trustGuestRxFilters"); - if (trustGuestRxFilters && - ((actual->trustGuestRxFilters - = virTristateBoolTypeFromString(trustGuestRxFilters)) <= 0)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown trustGuestRxFilters value '%s'"), - trustGuestRxFilters); - goto error; + if ((trustGuestRxFilters = virXMLPropString(node, "trustGuestRxFilters"))) { + int value; + if ((value = virTristateBoolTypeFromString(trustGuestRxFilters)) <= 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unknown trustGuestRxFilters value '%s'"), + trustGuestRxFilters); + goto error; + } + actual->trustGuestRxFilters = value; } virtPortNode = virXPathNode("./virtualport", ctxt); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 853cab96b5..90079d7e64 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -994,7 +994,7 @@ struct _virDomainActualNetDef { virNetDevVPortProfilePtr virtPortProfile; virNetDevBandwidthPtr bandwidth; virNetDevVlan vlan; - int trustGuestRxFilters; /* enum virTristateBool */ + virTristateBool trustGuestRxFilters; virTristateBool isolatedPort; unsigned int class_id; /* class ID for bandwidth 'floor' */ }; -- 2.26.2