mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-20 04:02:15 +02:00
Ignore pushed "client-ip" directive unless it is a valid IP address.
This commit is contained in:
parent
0cb153f89b
commit
ad6a96fafe
@ -404,8 +404,8 @@ namespace openvpn {
|
||||
ev->vpn_ip6 = tun->vpn_ip6();
|
||||
try {
|
||||
std::string client_ip = received_options.get_optional("client-ip", 1);
|
||||
if (client_ip.length() <= 64)
|
||||
ev->client_ip = client_ip;
|
||||
if (!client_ip.empty())
|
||||
ev->client_ip = IP::Addr::validate(client_ip, "client-ip");
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user