We shouldn't be checking validity in domain_conf, since
it can be used by multiple different hosts and hypervisors.
Remove the check completely.
Signed-off-by: Chris Lalancette <clalance(a)redhat.com>
---
src/conf/domain_conf.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 21c3b07..2658b43 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -1801,12 +1801,6 @@ cleanup:
}
-static bool
-isValidIfname(const char *ifname) {
- return ifname[strspn(ifname, VALID_IFNAME_CHARS)] == 0;
-}
-
-
/* Parse the XML definition for a network interface
* @param node XML nodeset to parse for net definition
* @return 0 on success, -1 on failure
@@ -1889,11 +1883,9 @@ virDomainNetDefParseXML(virCapsPtr caps,
xmlStrEqual(cur->name, BAD_CAST "target")) {
ifname = virXMLPropString(cur, "dev");
if ((ifname != NULL) &&
- (((flags & VIR_DOMAIN_XML_INACTIVE) &&
- (STRPREFIX((const char*)ifname, "vnet"))) ||
- (!isValidIfname(ifname)))) {
+ ((flags & VIR_DOMAIN_XML_INACTIVE) &&
+ (STRPREFIX((const char*)ifname, "vnet")))) {
/* An auto-generated target name, blank it out */
- /* blank out invalid interface names */
VIR_FREE(ifname);
}
} else if ((script == NULL) &&
--
1.6.6.1