net/mlx5e: Don't overwrite extack message returned from IPsec SA validator

Addition of new err_xfrm label caused to error messages be overwritten.
Fix it by using proper NL_SET_ERR_MSG_WEAK_MOD macro together with change
in a default message.

Fixes: aa8bd0c951 ("net/mlx5e: Support IPsec acquire default SA")
Reviewed-by: Raed Salem <raeds@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Leon Romanovsky 2023-04-20 11:02:48 +03:00 коммит произвёл David S. Miller
Родитель e239e31ae8
Коммит 697b3518eb
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -712,7 +712,7 @@ release_work:
kfree(sa_entry->work);
err_xfrm:
kfree(sa_entry);
NL_SET_ERR_MSG_MOD(extack, "Device failed to offload this policy");
NL_SET_ERR_MSG_WEAK_MOD(extack, "Device failed to offload this state");
return err;
}