]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Update prefix count for IPv6
authorIdo Schimmel <idosch@mellanox.com>
Tue, 18 Jul 2017 08:10:30 +0000 (10:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Jul 2017 18:57:34 +0000 (11:57 -0700)
commiteb8baa4afe5f850ef404fb48a7352bc30f2e297b
tree1d30c7e8600f58acd6ec97bdeadb1c685930bb84
parenta5348d59fba495ea6f88cf457ebc8d76227b6845
mlxsw: spectrum_router: Update prefix count for IPv6

The number of possible prefix lengths for IPv6 is 129 and not 128.

Fixes following warning from UBSAN when /128 routes are offloaded:

 UBSAN: Undefined behaviour in
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:2510:27 index 128 is out
of range for type 'long unsigned int [128]'

Fixes: 638a7b12eb3e ("mlxsw: spectrum_router: Implement private fib")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c