[LTP] [PATCH 0/2] pty: use correct protocol in pty04 based on line discipline
Vasileios Almpanis
vasileios.almpanis@virtuozzo.com
Fri Feb 6 13:51:11 CET 2026
Hi,
during testing of the LTP pty test pty04, we observed intermittent
failures caused by unexpected IPv6 packets being received.
The test currently filters packets using ETH_P_ALL. As a result,
packets with protocols other than the expected one (e.g. IPv6) may be
received, leading to data corruption reports such as:
TFAIL: Corrupt data (max 64 of 8191 bytes shown): data[0..64] =
TFAIL: 60 00 00 00 00 24 00 01 00 00 00 00 00 00 00 00
TFAIL: 00 00 00 00 00 00 00 00 ff 02 00 00 00 00 00 00
TFAIL: 00 00 00 00 00 00 00 16 3a 00 05 02 00 00 01 00
TFAIL: 8f 00 6e 8a 00 00 00 01 04 00 00 00 ff 02 00 00
This patch series addresses the issue by selecting the protocol based
on the configured line discipline.
Patch 1 adds a compatibility definition for ETH_P_CAN to the LAPI
headers. Patch 2 updates pty04 to choose the appropriate protocol,
avoiding reception of unrelated packets.
Signed-off-by: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
Vasileios Almpanis (2):
add ETH_P_CAN compat macro to LAPI headers
pty04: use the correct protocol per line discipline to avoid extra
packets
include/lapi/if_ether.h | 4 ++++
testcases/kernel/pty/pty04.c | 15 ++++++++++++++-
2 files changed, 18 insertions(+), 1 deletion(-)
--
2.43.0
More information about the ltp
mailing list