Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
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 8e94860b51..9f59756119 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -10854,14 +10854,15 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr 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 90079d7e64..15dc416384 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1102,7 +1102,7 @@ struct _virDomainNetDef {
GHashTable *filterparams;
virNetDevBandwidthPtr bandwidth;
virNetDevVlan vlan;
- int trustGuestRxFilters; /* enum virTristateBool */
+ virTristateBool trustGuestRxFilters;
virTristateBool isolatedPort;
int linkstate;
unsigned int mtu;
--
2.26.2