pci: fix MSI-X vector length check
Type: fix
Fixes: 38c6191
Change-Id: I7760947986dc56236f2494fb1c8c238321489ef6
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vnet/dev/pci.c b/src/vnet/dev/pci.c
index d35c5f9..3cc0cba 100644
--- a/src/vnet/dev/pci.c
+++ b/src/vnet/dev/pci.c
@@ -284,7 +284,7 @@
vnet_dev_t *dev = (vnet_dev_t *) vlib_pci_get_private_data (vm, h);
vnet_dev_bus_pci_device_data_t *pdd = vnet_dev_get_bus_pci_device_data (dev);
- if (line < vec_len (pdd->msix_handlers) && pdd->msix_handlers[line])
+ if (line < pdd->n_msix_int && pdd->msix_handlers[line])
pdd->msix_handlers[line](vm, dev, line);
}