net/mlx5e: Don't overwrite extack message returned from IPsec SA validator
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 20 Apr 2023 08:02:48 +0000 (11:02 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Apr 2023 10:49:47 +0000 (11:49 +0100)
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: aa8bd0c9518c ("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>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c

index 5fd609d1120ebf370c252f8567c1bb6d04d17b29..1547d8cda13351c3f0c493488de64ef2de8ad841 100644 (file)
@@ -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;
 }