diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c2dec23c3a..ad3db9b94d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -10877,14 +10877,15 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt, def->type = VIR_DOMAIN_NET_TYPE_USER; } - trustGuestRxFilters = virXMLPropString(node, "trustGuestRxFilters"); - if (trustGuestRxFilters && - ((def->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; + } + def->trustGuestRxFilters = value; } cur = node->children; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 4ed3433682..6b8e2fe375 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1103,7 +1103,7 @@ struct _virDomainNetDef { GHashTable *filterparams; virNetDevBandwidth *bandwidth; virNetDevVlan vlan; - int trustGuestRxFilters; /* enum virTristateBool */ + virTristateBool trustGuestRxFilters; virTristateBool isolatedPort; int linkstate; unsigned int mtu;