Tested a local windows build with this with various nasty questions
("--show-gateway 127.0.0.1", ON_LINK and not, etc) and v5 now gets us
the expected results for all my and Lev's tests. Plus, the code is much
more efficient on a system with many routes than "get all the tables
from Windows, and walk through them ourselves" - just ask Windows.
The patch looks a bit larger because it reuses the IPv6 logic, extracting
the common parts into get_best_route().
Your patch has been applied to the master branch.
commit 1f6b6b5b589bfb519b09b1b4e99086d64a2c8fc4
Author: Lev Stipakov
Date: Fri Jan 31 16:41:35 2025 +0100
route.c: improve get_default_gateway() logic on Windows
Signed-off-by: Lev Stipakov <[email protected]>
Acked-by: Gert Doering <[email protected]>
Message-Id: <[email protected]>
URL:
https://www.mail-archive.com/[email protected]/msg30769.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