[libvirt] [PATCH] virDomainNetDefParseXML: Fix typo

Michal Privoznik posted 1 patch 6 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/836f85d13f363306c37ccf735a3a0074690f7c86.1496851147.git.mprivozn@redhat.com
src/conf/domain_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] virDomainNetDefParseXML: Fix typo
Posted by Michal Privoznik 6 years, 10 months ago
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>
---

Pushed as trivial.

 src/conf/domain_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 2e2e7334a..3e884225b 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -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);
         }
 
-- 
2.13.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list