summaryrefslogtreecommitdiffstats
path: root/src/openvpn/options.h
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-11-21 21:08:02 +0100
committerGert Doering <gert@greenie.muc.de>2013-11-22 19:18:33 +0100
commit076fd3e46bbbe6261317d58cc2442f8eccc927ce (patch)
tree89ab4c04a76ed02fed6fa55d86e6b96922eedc1d /src/openvpn/options.h
parente85d87523af43c5fe5188f7ee1e2fdd2861dcffc (diff)
downloadopenvpn-076fd3e46bbbe6261317d58cc2442f8eccc927ce.tar.gz
openvpn-076fd3e46bbbe6261317d58cc2442f8eccc927ce.tar.xz
openvpn-076fd3e46bbbe6261317d58cc2442f8eccc927ce.zip
Change the type of all ports in openvpn to const char* and let getaddrinfo resolve the port together with the hostname.
This delays error reporting from config parsing to resolving of host addresses. But it allows statements like remote openvpn.example.org openvpn port https management localhost ntp Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <1385064495-25877-1-git-send-email-arne@rfc2549.org> URL: http://article.gmane.org/gmane.network.openvpn.devel/8018 Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/options.h')
-rw-r--r--src/openvpn/options.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/openvpn/options.h b/src/openvpn/options.h
index 8e0e367..84a5910 100644
--- a/src/openvpn/options.h
+++ b/src/openvpn/options.h
@@ -87,9 +87,9 @@ struct options_pre_pull
struct connection_entry
{
int proto;
- int local_port;
+ const char* local_port;
bool local_port_defined;
- int remote_port;
+ const char* remote_port;
const char *local;
const char *remote;
bool remote_float;
@@ -105,7 +105,7 @@ struct connection_entry
#endif
#ifdef ENABLE_SOCKS
const char *socks_proxy_server;
- int socks_proxy_port;
+ const char *socks_proxy_port;
const char *socks_proxy_authfile;
bool socks_proxy_retry;
#endif
@@ -143,7 +143,7 @@ struct connection_entry
struct remote_entry
{
const char *remote;
- int remote_port;
+ const char *remote_port;
int proto;
};
@@ -168,6 +168,8 @@ struct remote_host_store
{
# define RH_HOST_LEN 80
char host[RH_HOST_LEN];
+#define RH_PORT_LEN 20
+ char port[RH_PORT_LEN];
};
/* Command line options */
@@ -356,7 +358,7 @@ struct options
#ifdef ENABLE_MANAGEMENT
const char *management_addr;
- int management_port;
+ const char *management_port;
const char *management_user_pass;
int management_log_history_cache;
int management_echo_buffer_size;
@@ -451,7 +453,7 @@ struct options
bool auth_user_pass_verify_script_via_file;
#if PORT_SHARE
char *port_share_host;
- int port_share_port;
+ char *port_share_port;
const char *port_share_journal_dir;
#endif
#endif