From: Gert Doering Date: Sun, 8 Mar 2015 12:56:41 +0000 (+0100) Subject: Fix incorrect use of get_ipv6_addr() for iroute options. X-Git-Tag: v2.4_alpha1~318 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8562d5531277ee4dd7c517ef68e87af077ac948;p=thirdparty%2Fopenvpn.git 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 Acked-by: Steffan Karger Message-Id: <1425819401-18465-1-git-send-email-gert@greenie.muc.de> URL: http://article.gmane.org/gmane.network.openvpn.devel/9532 --- diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 20b37db9d..df9a64107 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -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);