Repair test_local_addr() on WIN32
PATCH 1/1 Repair test_local_addr() on WIN32
Intermediate result was stored in a "bool" variable, but the actual range of results is 0/1/2 - so "2" (TLA_LOCAL) never worked. Change to "int".
Diagnosed by "dferbas" in trac #609 (thanks).
Signed-off-by Gert Doering <[email protected]...>
--- src/openvpn/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/route.c +1 -1
@@ -3600,7 +3600,7 @@ test_local_addr (const in_addr_t addr, const struct route_gateway_info *rgi) {struct gc_arena gc =gc_new ();const in_addr_t nonlocal_netmask =0x80000000L ;/* routes with netmask <= to this are considered non-local */ -bool ret =TLA_NONLOCAL ; +int ret =TLA_NONLOCAL ;/* get full routing table */ const MIB_IPFORWARDTABLE *rt =get_windows_routing_table (&gc);
Signature · 1 line
2.4.6
Gert Doering schreef op vrijdag 25 september 2015 8:36:
Quoted 27 lines
Intermediate result was stored in a "bool" variable, but the actual range of results is 0/1/2 - so "2" (
TLA_LOCAL) never worked. Change to "int".Diagnosed by "dferbas" in trac #609 (thanks).
Signed-off-by Gert Doering <[email protected]...>--- src/openvpn/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/openvpn/route.c +0
-0@@ -3600,7 +3600,7 @@ test_local_addr (const in_addr_t addr, const struct route_gateway_info *rgi) {struct gc_arena gc =gc_new ();const in_addr_t nonlocal_netmask =0x80000000L ;/* routes with netmask <= to this are considered non-local */
src/openvpn/route.c +1
-2-bool ret =TLA_NONLOCAL ; +int ret =TLA_NONLOCAL ;/* get full routing table */ const MIB_IPFORWARDTABLE *rt =get_windows_routing_table (&gc); --
Quoted 1 line
2.4.6
ACK
-Steffan
Patch has been applied to the master and release/2.3 branch.
commit c40f088e52132273f6d4e83d05fa64bbaedd860f (master) commit 60287662bbdb1a29d9bd6244917a050410fa6b49 (release/2.3)
Author: Gert Doering Date: Fri Sep 25 08:36:10 2015 +0200
Repair test_local_addr() on WIN32
Signed-off-by: Gert Doering <[email protected]...>
Acked-by: Steffan Karger <[email protected]...>
Message-Id: <[email protected]...>
URL: http://article.gmane.org/gmane.network.openvpn.devel/10168--
kind regards,
Gert Doering