aboutsummaryrefslogtreecommitdiff
path: root/route.c
diff options
context:
space:
mode:
authorGert Doering <gert@greenie.muc.de>2010-10-30 21:03:16 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2010-11-12 21:54:08 +0100
commitf0eac1a5979096c671b3674f9d80871f496d1da8 (patch)
tree6b6cdffe0d1163fc9758f88de9c2e2d8d5dedadf /route.c
parentIntegrate support for TAP mode on Solaris, written by Kazuyoshi Aizawa <admin... (diff)
downloadopenvpn-f0eac1a5979096c671b3674f9d80871f496d1da8.tar.xz
Make "topology subnet" work on Solaris (ifconfig + route metric changes by Kazuyoshi Aizawa, adding of local "connected subnet" route by me)
Tested on OpenSolaris/i386, no impact for other TARGETs. Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: Kazuyoshi Aizawa <admin2@whiteboard.ne.jp> Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to '')
-rw-r--r--route.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/route.c b/route.c
index 24d4bd8..612bcbe 100644
--- a/route.c
+++ b/route.c
@@ -923,16 +923,14 @@ add_route (struct route *r, const struct tuntap *tt, unsigned int flags, const s
argv_printf (&argv, "%s add",
ROUTE_PATH);
-#if 0
- if (r->metric_defined)
- argv_printf_cat (&argv, "-rtt %d", r->metric);
-#endif
-
argv_printf_cat (&argv, "%s -netmask %s %s",
network,
netmask,
gateway);
+ if (r->metric_defined)
+ argv_printf_cat (&argv, "%d", r->metric);
+
argv_msg (D_ROUTE, &argv);
status = openvpn_execve_check (&argv, es, 0, "ERROR: Solaris route add command failed");