aboutsummaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorJuanJo Ciarlante <jjo@google.com>2009-10-20 22:38:50 +0200
committerJuanJo Ciarlante <juanjosec@gmail.com>2011-03-25 13:30:30 +0100
commit1ad6fc2976c6e5eedb248769e4b1f48e33c75346 (patch)
tree02e7f478e1e6d11639f52ef78f6547155a568cd1 /options.c
parent* openbsd: no IFF_MULTICAST, #ifdef around it (diff)
downloadopenvpn-1ad6fc2976c6e5eedb248769e4b1f48e33c75346.tar.xz
* no new funcionality, just small cleanups:
- cmdline options help: add tcp6/udp6 missing messages - win32: expand usage of proto_is_udp(), proto_is_tcp() - replace some memset(&obj, 0, sizeof obj) by openvpn's CLEAR(obj)
Diffstat (limited to '')
-rw-r--r--options.c30
1 files changed, 25 insertions, 5 deletions
diff --git a/options.c b/options.c
index ea42f3c..83017b8 100644
--- a/options.c
+++ b/options.c
@@ -1708,14 +1708,22 @@ options_postprocess_verify_ce (const struct options *options, const struct conne
&& ce->proto != PROTO_TCPv6_CLIENT
#endif
)
- msg (M_USAGE, "--connect-retry doesn't make sense unless also used with --proto tcp-client");
+ msg (M_USAGE, "--connect-retry doesn't make sense unless also used with --proto tcp-client"
+#ifdef USE_PF_INET6
+ " or tcp6-client"
+#endif
+ );
if (ce->connect_timeout_defined && ce->proto != PROTO_TCPv4_CLIENT
#ifdef USE_PF_INET6
&& ce->proto != PROTO_TCPv6_CLIENT
#endif
)
- msg (M_USAGE, "--connect-timeout doesn't make sense unless also used with --proto tcp-client");
+ msg (M_USAGE, "--connect-timeout doesn't make sense unless also used with --proto tcp-client"
+#ifdef USE_PF_INET6
+ " or tcp6-client"
+#endif
+ );
/*
* Sanity check on MTU parameters
@@ -1858,7 +1866,11 @@ options_postprocess_verify_ce (const struct options *options, const struct conne
|| ce->proto == PROTO_TCPv6_SERVER
#endif
))
- msg (M_USAGE, "--mode server currently only supports --proto udp or --proto tcp-server");
+ msg (M_USAGE, "--mode server currently only supports --proto udp or --proto tcp-server"
+#ifdef USE_PF_INET6
+ " or proto tcp6-server"
+#endif
+ );
#if PORT_SHARE
if ((options->port_share_host || options->port_share_port) &&
(ce->proto != PROTO_TCPv4_SERVER
@@ -1866,7 +1878,11 @@ options_postprocess_verify_ce (const struct options *options, const struct conne
&& ce->proto != PROTO_TCPv6_SERVER
#endif
))
- msg (M_USAGE, "--port-share only works in TCP server mode (--proto tcp-server)");
+ msg (M_USAGE, "--port-share only works in TCP server mode (--proto tcp-server"
+#ifdef USE_PF_INET6
+ " or tcp6-server"
+#endif
+ ")");
#endif
if (!options->tls_server)
msg (M_USAGE, "--mode server requires --tls-server");
@@ -1899,7 +1915,11 @@ options_postprocess_verify_ce (const struct options *options, const struct conne
|| ce->proto == PROTO_TCPv6_SERVER
#endif
))
- msg (M_USAGE, "--mode server currently only supports --proto udp or --proto tcp-server");
+ msg (M_USAGE, "--mode server currently only supports --proto udp or --proto tcp-server"
+#ifdef USE_PF_INET6
+ " or --proto tcp6-server"
+#endif
+ );
if (!proto_is_udp(ce->proto) && (options->cf_max || options->cf_per))
msg (M_USAGE, "--connect-freq only works with --mode server --proto udp. Try --max-clients instead.");
if (!(dev == DEV_TYPE_TAP || (dev == DEV_TYPE_TUN && options->topology == TOP_SUBNET)) && options->ifconfig_pool_netmask)