From bb6cd163d4b153e2d9a4ae307b1961ad370dc3d1 Mon Sep 17 00:00:00 2001 From: Christian Brueffer Date: Sat, 13 Mar 2021 16:11:33 +0100 Subject: [PATCH] OpenVPN: remove checks for NTP servers 3 and 4. (#4811) OpenVPN: remove checks for NTP servers 3 and 4 since only two optional NTP servers are exposed through the GUI. --- src/www/vpn_openvpn_csc.php | 6 ------ src/www/vpn_openvpn_server.php | 6 ------ 2 files changed, 12 deletions(-) diff --git a/src/www/vpn_openvpn_csc.php b/src/www/vpn_openvpn_csc.php index 5f1f27528..3307c2e39 100644 --- a/src/www/vpn_openvpn_csc.php +++ b/src/www/vpn_openvpn_csc.php @@ -158,12 +158,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { if (!empty($pconfig['ntp_server2']) && !is_ipaddr(trim($pconfig['ntp_server2']))) { $input_errors[] = gettext("The field 'NTP Server #2' must contain a valid IP address"); } - if (!empty($pconfig['ntp_server3']) && !is_ipaddr(trim($pconfig['ntp_server3']))) { - $input_errors[] = gettext("The field 'NTP Server #3' must contain a valid IP address"); - } - if (!empty($pconfig['ntp_server4']) && !is_ipaddr(trim($pconfig['ntp_server4']))) { - $input_errors[] = gettext("The field 'NTP Server #4' must contain a valid IP address"); - } } if (!empty($pconfig['netbios_enable'])) { diff --git a/src/www/vpn_openvpn_server.php b/src/www/vpn_openvpn_server.php index 621dca121..b019dc1b1 100644 --- a/src/www/vpn_openvpn_server.php +++ b/src/www/vpn_openvpn_server.php @@ -264,12 +264,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { if (!empty($pconfig['ntp_server2']) && !is_ipaddr(trim($pconfig['ntp_server2']))) { $input_errors[] = gettext("The field 'NTP Server #2' must contain a valid IP address"); } - if (!empty($pconfig['ntp_server3']) && !is_ipaddr(trim($pconfig['ntp_server3']))) { - $input_errors[] = gettext("The field 'NTP Server #3' must contain a valid IP address"); - } - if (!empty($pconfig['ntp_server4']) && !is_ipaddr(trim($pconfig['ntp_server4']))) { - $input_errors[] = gettext("The field 'NTP Server #4' must contain a valid IP address"); - } if (!empty($pconfig['wins_server_enable'])) { if (!empty($pconfig['wins_server1']) && !is_ipaddr(trim($pconfig['wins_server1']))) {