summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/cop/cop.c
diff options
context:
space:
mode:
Diffstat (limited to 'vnet/vnet/cop/cop.c')
-rw-r--r--vnet/vnet/cop/cop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vnet/vnet/cop/cop.c b/vnet/vnet/cop/cop.c
index a352b371818..465d6c97a2a 100644
--- a/vnet/vnet/cop/cop.c
+++ b/vnet/vnet/cop/cop.c
@@ -22,6 +22,7 @@ cop_sw_interface_add_del (vnet_main_t * vnm, u32 sw_if_index, u32 is_add)
cop_main_t * cm = &cop_main;
cop_config_data_t _data, *data = &_data;
vlib_main_t * vm = cm->vlib_main;
+ vnet_hw_interface_t * hi = vnet_get_sup_hw_interface (vnm, sw_if_index);;
cop_config_main_t * ccm;
int address_family;
u32 ci, default_next;
@@ -32,7 +33,7 @@ cop_sw_interface_add_del (vnet_main_t * vnm, u32 sw_if_index, u32 is_add)
* Ignore local interface, pg interfaces. $$$ need a #define for the
* first "real" interface. The answer is 5 at the moment.
*/
- if (sw_if_index < 5)
+ if (hi->dev_class_index == vnet_local_interface_device_class.index)
return 0;
for (address_family = VNET_COP_IP4; address_family < VNET_N_COPS;