linux/drivers/net/ovpn
Ralf Lici efd729408b ovpn: use datagram_poll_queue for socket readiness in TCP
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>
2025-10-23 15:46:04 +02:00
..
Makefile ovpn: implement TCP transport 2025-04-17 12:30:03 +02:00
bind.c ovpn: implement packet processing 2025-04-17 12:30:02 +02:00
bind.h ovpn: introduce the ovpn_peer object 2025-04-17 12:30:02 +02:00
crypto.c ovpn: kill key and notify userspace in case of IV exhaustion 2025-04-17 12:30:03 +02:00
crypto.h ovpn: kill key and notify userspace in case of IV exhaustion 2025-04-17 12:30:03 +02:00
crypto_aead.c ovpn: fix check for skb_to_sgvec_nomark() return value 2025-05-15 13:09:36 +02:00
crypto_aead.h ovpn: implement key add/get/del/swap via netlink 2025-04-17 12:30:03 +02:00
io.c ovpn: reset GSO metadata after decapsulation 2025-07-16 11:53:19 +02:00
io.h ovpn: implement keepalive mechanism 2025-04-17 12:30:03 +02:00
main.c ovpn: don't drop skb's dst when xmitting packet 2025-05-15 13:09:36 +02:00
main.h
netlink-gen.c ovpn: reject unexpected netlink attributes 2025-07-16 11:51:30 +02:00
netlink-gen.h ovpn: reject unexpected netlink attributes 2025-07-16 11:51:30 +02:00
netlink.c ovpn: reject unexpected netlink attributes 2025-07-16 11:51:30 +02:00
netlink.h ovpn: notify userspace when a peer is deleted 2025-04-17 12:30:03 +02:00
ovpnpriv.h ovpn: implement keepalive mechanism 2025-04-17 12:30:03 +02:00
peer.c ovpn: ensure sk is still valid during cleanup 2025-06-03 13:08:15 +02:00
peer.h ovpn: implement peer add/get/dump/delete via netlink 2025-04-17 12:30:03 +02:00
pktid.c ovpn: implement packet processing 2025-04-17 12:30:02 +02:00
pktid.h ovpn: implement packet processing 2025-04-17 12:30:02 +02:00
proto.h ovpn: implement packet processing 2025-04-17 12:30:02 +02:00
skb.h ovpn: add support for MSG_NOSIGNAL in tcp_sendmsg 2025-04-17 12:30:03 +02:00
socket.c ovpn: ensure sk is still valid during cleanup 2025-06-03 13:08:15 +02:00
socket.h ovpn: ensure sk is still valid during cleanup 2025-06-03 13:08:15 +02:00
stats.c ovpn: store tunnel and transport statistics 2025-04-17 12:30:02 +02:00
stats.h ovpn: store tunnel and transport statistics 2025-04-17 12:30:02 +02:00
tcp.c ovpn: use datagram_poll_queue for socket readiness in TCP 2025-10-23 15:46:04 +02:00
tcp.h ovpn: ensure sk is still valid during cleanup 2025-06-03 13:08:15 +02:00
udp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-07-17 11:00:33 -07:00
udp.h ovpn: ensure sk is still valid during cleanup 2025-06-03 13:08:15 +02:00