diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2008-09-04 20:35:09 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2008-09-04 20:35:09 +0000 |
commit | 0a838de8adf3b06590e73cff6415275d9b1cd4fe (patch) | |
tree | 17d8ef48307d970ad53efb4e9d7f61bf62a6e292 /socket.c | |
parent | Fixed minor compile issue in ntlm.c (mid-block declaration). (diff) | |
download | openvpn-0a838de8adf3b06590e73cff6415275d9b1cd4fe.tar.xz |
Added --allow-pull-fqdn option which allows client to pull DNS names
from server (rather than only IP address) for --ifconfig, --route, and
--route-gateway. OpenVPN versions 2.1_rc7 and earlier allowed DNS names
for these options to be pulled and translated to IP addresses by default.
Now --allow-pull-fqdn will be explicitly required on the client to enable
DNS-name-to-IP-address translation of pulled options.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3307 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'socket.c')
-rw-r--r-- | socket.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -294,6 +294,17 @@ ip_addr_dotted_quad_safe (const char *dotted_quad) } } +bool +ip_or_dns_addr_safe (const char *dotted_quad, const bool allow_fqdn) +{ + if (ip_addr_dotted_quad_safe (dotted_quad)) + return true; + else if (allow_fqdn) + return string_class (dotted_quad, CC_NAME|CC_DASH|CC_DOT, 0); + else + return false; +} + static void update_remote (const char* host, struct openvpn_sockaddr *addr, |