As discusssed on IRC, this is the first patch of a series to improve the IPv4 gateway lookup, aka, "make it as good as the IPv6 implementation".
The problem today is that the IPv4 code only looks for "the default route", which is not the right answer for "which route and interface is used to reach the VPN server?" in case of more-specific routes - arguably not the most common case, but if we can get it right, we should. This patch does not change anything but add an (unused) "in_addr_t host" argument to all the get_default_gateway() calls & implementations. Further patches will enhance the per-platform implementations to use this info (if possible). So the thing to test here is "was any of our platforms overlooked, and compilation fails" - and the anwswer is "it compiles, ship it!" ;-) Your patch has been applied to the master branch. commit 0fcfc8381f60d9f7b4a53afaea223dfee5e18835 Author: Lev Stipakov Date: Wed Jan 29 10:50:38 2025 +0100 route.c: change the signature of get_default_gateway() Signed-off-by: Lev Stipakov <l...@openvpn.net> Acked-by: Gert Doering <g...@greenie.muc.de> Message-Id: <20250129095038.19056-1-g...@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg30685.html Signed-off-by: Gert Doering <g...@greenie.muc.de> -- kind regards, Gert Doering _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel