From 400a6d92d9ef8d98eda478011ea0182e2ba5afe7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20Gonz=C3=A1lez?= <cgonzalez@opennebula.systems>
Date: Thu, 22 Nov 2018 10:33:37 +0100
Subject: [PATCH] development: Fix bug at parse_phydev_vlans

---
 include/VirtualNetwork.h  | 2 +-
 src/vnm/VirtualNetwork.cc | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/VirtualNetwork.h b/include/VirtualNetwork.h
index 8b06d4bbce..aa945ca349 100644
--- a/include/VirtualNetwork.h
+++ b/include/VirtualNetwork.h
@@ -173,7 +173,7 @@ public:
      *    @param error_str describing the error
      *    @return 0 on success -1 otherwise
      */
-    static int parse_phydev_vlans(const Template& tmpl, const string& vn_mad, const string& phydev, 
+    static int parse_phydev_vlans(const Template* tmpl, const string& vn_mad, const string& phydev, 
                                   const string& bridge, const bool auto_id, const string& vlan_id, 
                                   const bool auto_outer, const string& outer_id, string& estr);
 
diff --git a/src/vnm/VirtualNetwork.cc b/src/vnm/VirtualNetwork.cc
index bfbb4e4499..3d787ebfa1 100644
--- a/src/vnm/VirtualNetwork.cc
+++ b/src/vnm/VirtualNetwork.cc
@@ -141,7 +141,7 @@ LIST OF MANDATORY ARGUMENTS FOR NETWORK DEFINITION
 | ovswitch_vxlan | yes     | no     | OUTER or AUTOMATIC_OUTER |                |
 +----------------+---------+--------+--------------------------+----------------+
 */
-int VirtualNetwork::parse_phydev_vlans(const Template& tmpl, const string& vn_mad, const string& phydev, 
+int VirtualNetwork::parse_phydev_vlans(const Template* tmpl, const string& vn_mad, const string& phydev, 
                                        const string& bridge, const bool auto_id, const string& vlan_id, 
                                        const bool auto_outer, const string& outer_id, string& estr)
 {
@@ -213,7 +213,7 @@ int VirtualNetwork::parse_phydev_vlans(const Template& tmpl, const string& vn_ma
 
         for ( it = other.begin(); it != other.end() ; ++it)
         {
-            if (!tmpl.get((*it).c_str(), value))
+            if (!tmpl->get((*it).c_str(), value))
             {
                 estr = *it + " is mandatory for driver " + vn_mad;
                 return -1;