Fix incorrect use of get_ipv6_addr() for iroute options.
PATCH 1/1 Fix incorrect use of get_ipv6_addr() for iroute options.
get_ipv6_addr() returns "bool/false", not "int < 0" to signal error.
Signed-off-by Gert Doering <[email protected]...>
--- src/openvpn/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/options.c +1 -1
@@ -1254,7 +1254,7 @@ option_iroute_ipv6 (struct options *o, ALLOC_OBJ_GC (ir, struct iroute_ipv6, &o->gc); -if (get_ipv6_addr (prefix_str, &ir->network, &ir->netbits,NULL , msglevel ) <0 ) +if ( !get_ipv6_addr (prefix_str, &ir->network, &ir->netbits,NULL , msglevel )) {msg (msglevel,"in --iroute-ipv6 %s: Bad IPv6 prefix specification" , prefix_str);
Signature · 1 line
2.0.5
Quoted 12 lines · Gert Doering
get_ipv6_addr()returns "bool/false", not "int < 0" to signal error.Signed-off-by Gert Doering <[email protected]...>--- src/openvpn/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/openvpn/options.c +0
-0
src/openvpn/options.c option_iroute_ipv6 (struct options *o, · line 1260
Quoted 8 lines
src/openvpn/options.c +1
-1@@ -1254,7 +1254,7 @@ option_iroute_ipv6 (struct options *o, ALLOC_OBJ_GC (ir, struct iroute_ipv6, &o->gc); -if (get_ipv6_addr (prefix_str, &ir->network, &ir->netbits,NULL , msglevel ) <0 ) +if ( !get_ipv6_addr (prefix_str, &ir->network, &ir->netbits,NULL , msglevel )) {msg (msglevel,"in --iroute-ipv6 %s: Bad IPv6 prefix specification" , prefix_str);
ACK
-Steffan
Patch has been applied to the master and release/2.3 branch.
commit e8562d5531277ee4dd7c517ef68e87af077ac948 (master) commit 5f5e49762ccd267af6b82e6bb600fe329d18463e (release/2.3)
Author: Gert Doering Date: Sun Mar 8 13:56:41 2015 +0100
Fix incorrect use of get_ipv6_addr() for iroute options.
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/9532--
kind regards,
Gert Doering