[Openvpn-devel,net,v4,0/9] ovpn: assorted net fixes

Message ID 20260728114855.1323861-1-a@unstable.cc
Headers
Series ovpn: assorted net fixes |

Message

Antonio Quartulli July 28, 2026, 11:48 a.m. UTC
  From: Antonio Quartulli <antonio@openvpn.net>

Hi all,

This is v4 of the collected ovpn fixes for net, sent here for review
(and sashiko re-review) before submission to netdev as a pull request.

v3 got a sashiko review that flagged three new issues; this v4 addresses
all of them.

Changes since v3:
* "ovpn: zero-initialize sockaddr before learning a floated endpoint":
  build the floated endpoint with a designated initializer instead of
  zeroing the whole sockaddr_storage on every received packet, so the
  padding is still cleared without a memset on the RX fast path
* "ovpn: invalidate the UDP TX dst_cache when the flow key changes":
  - re-validate sport/mark in the post-lookup check as well: the TX
    entry check alone could let a slow resolver cache a route tagged
    with a sport/mark another CPU had already changed
  - compare bind->local against the value snapshotted before the route
    lookup instead of the FIB-populated fl.saddr, so caching is no
    longer skipped for a peer whose local address is not yet known

No functional changes to the other patches.

Thanks,
	Antonio

Antonio Quartulli (9):
  ovpn: skip rehash for peers already removed from by_id
  ovpn: rehash peer in by_transp_addr table on CMD_PEER_SET
  ovpn: fix data race reading cached local endpoint on TX path
  ovpn: ensure socket is owned by ovpn before deref sk_user_data
  ovpn: zero-initialize sockaddr before learning a floated endpoint
  ovpn: hash floated peer by transport identity only
  ovpn: disable IPv4 redirects on MP interfaces
  ovpn: ensure TCP vars are initialized first
  ovpn: invalidate the UDP TX dst_cache when the flow key changes

 drivers/net/ovpn/main.c    |  60 ++++++++----
 drivers/net/ovpn/netlink.c |  19 +++-
 drivers/net/ovpn/peer.c    | 196 ++++++++++++++++++++++++++++---------
 drivers/net/ovpn/peer.h    |  15 +++
 drivers/net/ovpn/socket.c  |   9 ++
 drivers/net/ovpn/udp.c     | 108 +++++++++++++++++---
 6 files changed, 329 insertions(+), 78 deletions(-)
  

Comments

Antonio Quartulli July 29, 2026, 2:33 p.m. UTC | #1
From: Antonio Quartulli <antonio@openvpn.net>


On Tue, 28 Jul 2026 13:48:46 +0200, Antonio Quartulli wrote:
> From: Antonio Quartulli <antonio@openvpn.net>
> 
> Hi all,
> 
> This is v4 of the collected ovpn fixes for net, sent here for review
> (and sashiko re-review) before submission to netdev as a pull request.
> 
> [...]

Applied, thanks!

[1/9] ovpn: skip rehash for peers already removed from by_id
      commit: 0fafa38e783ad5e9449e4bdf88ca0f244ef8e779
[2/9] ovpn: rehash peer in by_transp_addr table on CMD_PEER_SET
      commit: e2b7734c71642a89efadfcf9551ab520ad321f4b
[3/9] ovpn: fix data race reading cached local endpoint on TX path
      commit: f186e6c20e6662f31e491033f14b713deddf56c5
[4/9] ovpn: ensure socket is owned by ovpn before deref sk_user_data
      commit: bdd361f524ec4ecfdb3a42c86f452433aa5299b2
[5/9] ovpn: zero-initialize sockaddr before learning a floated endpoint
      commit: 34b1bd4d42295a8451c72b3c7838b2e122b4c989
[6/9] ovpn: hash floated peer by transport identity only
      commit: f2da4f5d5effeaf465486ff29faa3fab3b30f9f6
[7/9] ovpn: disable IPv4 redirects on MP interfaces
      commit: 635c25927d98186813c2e0e3d5781ae64bc8d45f
[8/9] ovpn: ensure TCP vars are initialized first
      commit: a6b96b20e356138d932e2e44eebe15bf01506c15

Best regards,