Skip to content

Commit

Permalink
net/mlx5e: Make sure fib dev exists in fib event
Browse files Browse the repository at this point in the history
[ Upstream commit eb96cc1 ]

For unreachable route entry the fib dev does not exists.

Fixes: 8914add ("net/mlx5e: Handle FIB events to update tunnel endpoint device")
Reported-by: Dennis Afanasev <dennis.afanasev@stateless.net>
Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Reviewed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
roidayan authored and gregkh committed Jun 3, 2021
1 parent 9d0c46a commit a663fe9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c
Expand Up @@ -1504,7 +1504,7 @@ mlx5e_init_fib_work_ipv4(struct mlx5e_priv *priv,

fen_info = container_of(info, struct fib_entry_notifier_info, info);
fib_dev = fib_info_nh(fen_info->fi, 0)->fib_nh_dev;
if (fib_dev->netdev_ops != &mlx5e_netdev_ops ||
if (!fib_dev || fib_dev->netdev_ops != &mlx5e_netdev_ops ||
fen_info->dst_len != 32)
return NULL;

Expand Down

0 comments on commit a663fe9

Please sign in to comment.