0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 20:13:05 +02:00

Refactored methods for parsing/validating hosts/ports into openvpn/common/hostport.hpp

This commit is contained in:
James Yonan 2015-05-19 15:03:46 -06:00 committed by Lev Stipakov
parent 870ac130f3
commit 3c46024674
No known key found for this signature in database
GPG Key ID: 88670BE258B9C258

View File

@ -532,7 +532,7 @@ namespace openvpn {
throw option_error("only TCP supported");
const IP::Addr ip_addr = IP::Addr::from_string(listen_item.addr);
local_endpoint.address(ip_addr.to_asio());
local_endpoint.port(parse_port(listen_item.port, "port"));
local_endpoint.port(HostPort::parse_port(listen_item.port, "http listen"));
// open socket and bind to local address
acceptor.open(local_endpoint.protocol());