Files
Ralf Lici 28669c3c42 ovpn: use datagram_poll_queue for socket readiness in TCP
[ Upstream commit efd729408b ]

openvpn TCP encapsulation uses a custom queue to deliver packets to
userspace. Currently it relies on datagram_poll, which checks
sk_receive_queue, leading to false readiness signals when that queue
contains non-userspace packets.

Switch ovpn_tcp_poll to use datagram_poll_queue with the peer's
user_queue, ensuring poll only signals readiness when userspace data is
actually available. Also refactor ovpn_tcp_poll in order to enforce the
assumption we can make on the lifetime of ovpn_sock and peer.

Fixes: 11851cbd60 ("ovpn: implement TCP transport")
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Signed-off-by: Ralf Lici <ralf@mandelbit.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://patch.msgid.link/20251021100942.195010-4-ralf@mandelbit.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-10-29 14:10:20 +01:00
..
2025-04-17 12:30:02 +02:00
2025-04-17 12:30:02 +02:00
2025-04-17 12:30:03 +02:00
2025-04-17 12:30:03 +02:00
2025-04-17 12:30:03 +02:00
2025-04-17 12:30:02 +02:00
2025-04-17 12:30:02 +02:00
2025-04-17 12:30:02 +02:00