Skip to content

ovpn: assorted net fixes

Antonio Quartulli openvpn-devel 4 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest9 patches 3 repliesApplied
  2. v39 patches 1 replySuperseded
  3. v29 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v19 patches3 repliesSuperseded

Changes in v4 from the cover letter

* "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

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/9ovpn: skip rehash for peers already removed from by_iddrivers/net/ovpn/peer.c+43 -300 replies
2/9ovpn: rehash peer in by_transp_addr table on CMD_PEER_SETdrivers/net/ovpn/netlink.c drivers/net/ovpn/peer.c drivers/net/ovpn/peer.h+79 -330 replies
3/9ovpn: fix data race reading cached local endpoint on TX pathdrivers/net/ovpn/netlink.c drivers/net/ovpn/peer.c drivers/net/ovpn/peer.h +1 more+55 -70 replies
4/9ovpn: ensure socket is owned by ovpn before deref sk_user_datadrivers/net/ovpn/socket.c+9 -00 replies
5/9ovpn: zero-initialize sockaddr before learning a floated endpointdrivers/net/ovpn/peer.c+23 -82 replies
6/9ovpn: hash floated peer by transport identity onlydrivers/net/ovpn/peer.c+21 -40 replies
7/9ovpn: disable IPv4 redirects on MP interfacesdrivers/net/ovpn/main.c+35 -150 replies
8/9ovpn: ensure TCP vars are initialized firstdrivers/net/ovpn/main.c+7 -30 replies
9/9ovpn: invalidate the UDP TX dst_cache when the flow key changesdrivers/net/ovpn/peer.h drivers/net/ovpn/udp.c+94 -150 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [Openvpn-devel] [PATCH ovpn net v4 0/9] ovpn: assorted net fixes

From: Antonio Quartulli <[email protected]>

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(-)
Signature · 8 lines
2.54.0



_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel