From: Arkadi Sharshevsky <arka...@mellanox.com>

During the neighbor traversal the neighbors from different families
should be ignored.

Fixes: c58035a74aba ("mlxsw: spectrum_dpipe: Add support for IPv4 host table 
dump")
Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com>
Signed-off-by: Jiri Pirko <j...@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c 
b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
index 3c8599f..3ea1314 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
@@ -516,6 +516,9 @@ mlxsw_sp_dpipe_table_host_entries_get(struct mlxsw_sp 
*mlxsw_sp,
 
                rif_neigh_count = 0;
                mlxsw_sp_rif_neigh_for_each(neigh_entry, rif) {
+                       if (mlxsw_sp_neigh_entry_type(neigh_entry) != type)
+                               continue;
+
                        if (rif_neigh_count < rif_neigh_skip)
                                goto skip;
 
-- 
2.9.3

Reply via email to