Skip to contentSkip to conversation

Error message if max-routes used incorrectly

PATCH Applied Arne Schwabe 3 participants 3 messages Nov 19, 2012 – Nov 22, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Error message if max-routes used incorrectly

the route/route-ipv6/redirect-gateway options allocate the route structe with max_routes number of routes. A max-routes after any of this commands has no effect. This can be problematic (http://code.google.com/p/ics-openvpn/issues/detail?id=101)

---
 src/openvpn/options.c |    5 +++++
 1 file changed, 5 insertions(+)
src/openvpn/options.c +5 -0
index 9baa4ff..5f19c27 100644
@@ -5141,6 +5141,11 @@ add_option (struct options *options,
 	  msg (msglevel, "--max-routes parameter is out of range");
 	  goto err;
 	}
+      if (options->routes || options->routes_ipv6)
+	{
+		msg (msglevel, "--max-routes must to be specifed before any route/route-ipv6/redirect-gateway option");
+	  goto err;
+	}
       options->max_routes = max_routes;
     }
   else if (streq (p[0], "route-gateway") && p[1])
Signature · 1 line
1.7.9.5
#1 lore raw

Hi,

Quoted 1 line · Arne Schwabe

the route/route-ipv6/redirect-gateway options allocate the route structe with max_routes number of routes. A max-routes after any of this commands has no effect. This can be problematic (http://code.google.com/p/ics-openvpn/issues/detail?id=101)

ACK, for 2.3. Makes sense.

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#2 lore raw
In reply to Arne Schwabe

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 7 lines · Arne Schwabe

the route/route-ipv6/redirect-gateway options allocate the route structe with max_routes number of routes. A max-routes after any of this commands has no effect. This can be problematic
(http://code.google.com/p/ics-openvpn/issues/detail?id=101)

src/openvpn/options.c | 5 +++++ 1 file changed, 5 insertions(+)

Applied to master and beta/2.3 branches.

commit f83ccec6525179968b68696acb6ccf22182fc6de (master) commit cb8c4efde0d7c26c2e2cd71bc419169ffb14f935 (beta/2.3)

Author: Arne Schwabe <[email protected]...>
Date:   Mon Nov 19 19:12:17 2012 +0100
    Error message if max-routes used incorrectly

    Signed-off-by: Arne Schwabe <[email protected]...>
    Acked-by: Gert Doering <[email protected]...>
    Message-Id: [email protected]...
    URL: http://article.gmane.org/gmane.network.openvpn.devel/7131
    Signed-off-by: David Sommerseth <[email protected]...>

- --
kind regards,

David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlCuA5oACgkQDC186MBRfrqbYgCeJkTKA10X9ifnTg8tDrFxBZig Ef8An00qW7PQk93CBvAAABkly8g+WyzH
=xGnv
-----END PGP SIGNATURE-----