Antony Antony 73c19830cd xfrm: Log input direction mismatch error in one place
[ Upstream commit 15f5fe9e84839dcc9eaa69b08ced9d24cb464369 ]

Previously, the offload data path decrypted the packet before checking
the direction, leading to error logging and packet dropping. However,
dropped packets wouldn't be visible in tcpdump or audit log.

With this fix, the offload path, upon noticing SA direction mismatch,
will pass the packet to the stack without decrypting it. The L3 layer
will then log the error, audit, and drop ESP without decrypting or
decapsulating it.

This also ensures that the slow path records the error and audit log,
making dropped packets visible in tcpdump.

Fixes: 304b44f0d5a4 ("xfrm: Add dir validation to "in" data path lookup")
Signed-off-by: Antony Antony <antony.antony@secunet.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-03 08:59:39 +02:00
..
2024-05-01 18:37:07 -07:00
2024-05-08 10:39:26 +01:00
2024-04-30 18:32:38 -07:00
2024-01-04 10:23:10 -08:00
2023-10-16 21:05:33 -07:00
2024-04-30 18:46:52 -07:00
2024-05-29 17:34:49 -07:00
2024-08-03 08:59:35 +02:00
2024-08-03 08:59:35 +02:00
2024-08-03 08:59:35 +02:00
2023-09-14 16:16:36 +02:00