]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Compare key with correct object type
authorIdo Schimmel <idosch@nvidia.com>
Fri, 13 Nov 2020 16:05:45 +0000 (18:05 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sun, 15 Nov 2020 00:55:03 +0000 (16:55 -0800)
commit08f77ec52534a538b170c931b0b431cc9b5edd1d
treeb51c5a296b3c1c454b6d45655f451999f7c27213
parentb4301169c01e5126c85b60e5ae840b8620d3fb99
mlxsw: spectrum_router: Compare key with correct object type

When comparing a key with a nexthop group in rhastable's obj_cmpfn()
callback, make sure that the key and nexthop group are of the same type
(i.e., IPv4 / IPv6).

The bug is not currently visible because IPv6 nexthop groups do not
populate the FIB info pointer and IPv4 nexthop groups do not set the
ifindex for the individual nexthops.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c