B #1520: Saved MAC into attribute VROUTER_MAC for can detach nic

(cherry picked from commit 5ed8aaa47b)
This commit is contained in:
juanmont authored and Ruben S. Montero committed 2017-11-28 15:12:12 +01:00
1 parent 490e2aea80
commit 143daceb3b
1 file changed
+4 -5
+4 -5
View File
@@ -409,7 +409,7 @@ int VirtualRouter::release_network_leases(const VectorAttribute * nic)
return -1;
}
mac = nic->vector_value("MAC");
mac = nic->vector_value("VROUTER_MAC");
vn = vnpool->get(vnid, true);
@@ -457,8 +457,7 @@ static void prepare_nic_vm(VectorAttribute * nic)
if (floating)
{
nic->remove("MAC");
vrouter_prefix(nic, "MAC");
vrouter_prefix(nic, "IP");
vrouter_prefix(nic, "IP6_LINK");
vrouter_prefix(nic, "IP6_ULA");
@@ -659,10 +658,10 @@ int VirtualRouter::detach_nic(int nic_id)
return -1;
}
obj_template->remove(nic);
release_network_leases(nic);
obj_template->remove(nic);
// Update quotas
tmpl.set(nic);