diff options
author | Roi Dayan <roid@nvidia.com> | 2021-05-02 10:25:50 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2021-05-18 23:01:36 -0700 |
commit | eb96cc15926f4ddde3a28c42feeffdf002451c24 (patch) | |
tree | 7e863a5f4b249b9190492cbce7a88ef366968115 /drivers | |
parent | 83026d83186bc48bb41ee4872f339b83f31dfc55 (diff) | |
download | linux-stable-eb96cc15926f4ddde3a28c42feeffdf002451c24.tar.gz linux-stable-eb96cc15926f4ddde3a28c42feeffdf002451c24.tar.bz2 linux-stable-eb96cc15926f4ddde3a28c42feeffdf002451c24.zip |
net/mlx5e: Make sure fib dev exists in fib event
For unreachable route entry the fib dev does not exists.
Fixes: 8914add2c9e5 ("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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c index 593503bc4d07..f1fb11680d20 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c @@ -1505,7 +1505,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; |