From 304f1ab9bd8f166f55d382d73e28e27e7a8da0b0 Mon Sep 17 00:00:00 2001 From: Naveen N Date: Wed, 27 May 2015 14:06:44 +0530 Subject: [PATCH] Dont update device type to invalid, when interface configuration is deleted Upon interface config deleting agent was setting device type of a VMI to invalid, and if the device type is invalid, ip and evpn routes were not getting deleted. Once device type is determined dont update the type to invalid. test_intf already catches this case Closes-bug:#1459124 Change-Id: I51e745db03fe3d39cce72470e3cf7d54635727ea --- src/vnsw/agent/oper/vm_interface.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vnsw/agent/oper/vm_interface.cc b/src/vnsw/agent/oper/vm_interface.cc index 402b6328d98..f73c52c67ba 100644 --- a/src/vnsw/agent/oper/vm_interface.cc +++ b/src/vnsw/agent/oper/vm_interface.cc @@ -1668,7 +1668,8 @@ bool VmInterface::CopyConfig(const InterfaceTable *table, *ecmp_changed = true; } - if (device_type_ != data->device_type_) { + if (data->device_type_ != VmInterface::DEVICE_TYPE_INVALID && + device_type_ != data->device_type_) { device_type_= data->device_type_; ret = true; }