From 655b0633e50936ee45d5e488b6a6186bf3f27eb2 Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Wed, 17 Jan 2024 08:51:22 +0100 Subject: [PATCH] canfdtest: fix detection of own frames Use the correct flag MSG_CONFIRM to detect frames generated on this socket. Fixes: c35ed80b3d25 ("canfdtest: use struct msghdr::msg_flags to detect own frames") --- canfdtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/canfdtest.c b/canfdtest.c index 37c7ea47..b45f563c 100644 --- a/canfdtest.c +++ b/canfdtest.c @@ -391,7 +391,7 @@ static int can_echo_gen(void) print_frame(rx_frame.can_id, rx_frame.data, rx_frame.len, 0); /* own frame */ - if (flags & MSG_DONTROUTE) { + if (flags & MSG_CONFIRM) { err = compare_frame(&tx_frames[recv_tx_pos], &rx_frame, 0); recv_tx[recv_tx_pos] = true; recv_tx_pos++;