mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 09:02:06 +00:00
net/mlx5e: Avoid creating tunnel headers for local route
It could be local and remote are on the same machine and the route
result will be a local route which will result in creating encap id
with src/dst mac address of 0.
Fixes: a54e20b4fc
("net/mlx5e: Add basic TC tunnel set action for SRIOV offloads")
Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
d3875924da
commit
c623c95afa
1 changed files with 5 additions and 0 deletions
|
@ -124,6 +124,11 @@ static int mlx5e_route_lookup_ipv4_get(struct mlx5e_priv *priv,
|
|||
if (IS_ERR(rt))
|
||||
return PTR_ERR(rt);
|
||||
|
||||
if (rt->rt_type != RTN_UNICAST) {
|
||||
ret = -ENETUNREACH;
|
||||
goto err_rt_release;
|
||||
}
|
||||
|
||||
if (mlx5_lag_is_multipath(mdev) && rt->rt_gw_family != AF_INET) {
|
||||
ret = -ENETUNREACH;
|
||||
goto err_rt_release;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue