mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-22 02:20:40 +00:00
net/mlx5: IPsec, Fix esp modify function attribute
[ Upstream commit0dc2c534f1
] The function mlx5_fpga_esp_validate_xfrm_attrs is wrongly used with negative negation as zero value indicates success but it used as failure return value instead. Fix by remove the unary not negation operator. Fixes:05564d0ae0
("net/mlx5: Add flow-steering commands for FPGA IPSec implementation") Signed-off-by: Raed Salem <raeds@mellanox.com> Reviewed-by: Boris Pismenny <borisp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
74888191bb
commit
0be678f179
1 changed files with 1 additions and 1 deletions
|
@ -1478,7 +1478,7 @@ int mlx5_fpga_esp_modify_xfrm(struct mlx5_accel_esp_xfrm *xfrm,
|
|||
if (!memcmp(&xfrm->attrs, attrs, sizeof(xfrm->attrs)))
|
||||
return 0;
|
||||
|
||||
if (!mlx5_fpga_esp_validate_xfrm_attrs(mdev, attrs)) {
|
||||
if (mlx5_fpga_esp_validate_xfrm_attrs(mdev, attrs)) {
|
||||
mlx5_core_warn(mdev, "Tried to create an esp with unsupported attrs\n");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue