I'm not sure how relevant this bug is in practice ("nobody uses IP options")
but nevertheless it improves code readability by using proper tcp/udp 
structure pointers - and it's undoubtedly more correct this way.

I've been told that users actually use client NAT in OpenVPN, so maybe
someone has been really hit by this and application to 2.7 makes sense
- it's very localized, so for anyone not using this, it makes no
difference.  Won't harm.

Tested master on FreeBSD and 2.7 on a linux t_client, with a new 
test case built for client-nat snat+dnat.

Your patch has been applied to the master and release/2.7 branch.

commit d3eadb7af670e3f200bae3ba9c3befc35b643b2e
commit c4e41eac49906fef85b17ad832a77babfebb4f2d (release/2.7)
Author: Razvan Cojocaru
Date:   Sun Nov 29 18:16:19 2026 +0100

     clinat: locate the TCP/UDP header via the IP header length

     Signed-off-by: Razvan Cojocaru <[email protected]>
     Acked-by: Antonio Quartulli <[email protected]>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2208
     Message-Id: <[email protected]>
     URL: 
https://www.mail-archive.com/[email protected]/msg42161.html
     Signed-off-by: Gert Doering <[email protected]>


--
kind regards,

Gert Doering



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

Reply via email to