virDomainNetDefParseXML: Fix typo

In 9cb891141c we've introduced some logic to clearing suggested
macvtap/macvlan ifnames. The logic consists of comparing ifname
string with strings that libvirt would generate. However, due to
a typo only VIR_NET_GENERATED_MACVTAP_PREFIX was compared. Twice.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2017-06-07 17:52:40 +02:00
parent c44482eb4f
commit 836f85d13f

View File

@ -10074,7 +10074,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
if (ifname &&
flags & VIR_DOMAIN_DEF_PARSE_INACTIVE &&
(STRPREFIX(ifname, VIR_NET_GENERATED_MACVTAP_PREFIX) ||
STRPREFIX(ifname, VIR_NET_GENERATED_MACVTAP_PREFIX))) {
STRPREFIX(ifname, VIR_NET_GENERATED_MACVLAN_PREFIX))) {
VIR_FREE(ifname);
}