Thanks Gert! :) I did find a nice built-in method in the OVPN source code
to extract both the source and destination ipv4 addresses
(mroute_extract_addr_ip) which I was able to use and build on top of to
help solve this multi-threaded "issue" of mine. It has helped greatly in
terms of performance now as I am able to simply associate an IPv4
connection state to an available thread which will result in ordered packet
processing of data from the TUN device (read/write). This has helped
greatly to prevent or reduce the amount of processing and reordering that
TCP and QUIC-UDP have to perform and things are loading "snappier" now it
seems. The other available threads can also work on their own connection
states at the same time allowing them to work in parallel but also
separately if you will. Thanks again for your work on this project and
inputs on this proof-of-concept experiment I'm running. I wouldn't have
been able to do any of this with WireGuard!

Blog post:
https://fossjon.com/2025/10/22/solving-a-final-remaining-performance-impact-with-mutli-threaded-operation-by-using-connection-state-mapping-in-the-highly-modified-openvpn-source-code-implementation/



On Tue, Oct 21, 2025 at 2:40 AM Gert Doering <[email protected]> wrote:

> Hi,
>
> On Mon, Oct 20, 2025 at 04:15:22PM -0400, Jon Chiappetta via Openvpn-devel
> wrote:
> > I was wondering if any part of the OpenVPN source code parses the IPv4
> > packet header for source/destination address already in place?
>
> With tun/tap and ipv4/ipv6, this is a bit of nastiness...
>
> You might want to have a look at drop_if_recursive_routing() in master,
> as that one has to find destination address & port and will log source
> address & port.
>
> Not sure we have something more convenient.  Grepping for openvpn_iphdr
> might turn up something, though :-) (like somewhere in the NAT code).
>
> gert
> --
> "If was one thing all people took for granted, was conviction that if you
>  feed honest figures into a computer, honest figures come out. Never
> doubted
>  it myself till I met a computer with a sense of humor."
>                              Robert A. Heinlein, The Moon is a Harsh
> Mistress
>
> Gert Doering - Munich, Germany
> [email protected]
>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to