Revision d73918f2
Added by Nano Caiordo over 6 years ago
src/usr/local/www/status_ntpd.php | ||
---|---|---|
33 | 33 |
|
34 | 34 |
require_once("guiconfig.inc"); |
35 | 35 |
|
36 |
if (!isset($config['ntpd']['noquery'])) { |
|
36 |
$allow_query = !isset($config['ntpd']['noquery']); |
|
37 |
|
|
38 |
if (is_ipaddr($_SERVER['REMOTE_ADDR']) && !empty($config['ntpd']['restrictions']['row']) && is_array($config['ntpd']['restrictions']['row'])) { |
|
39 |
foreach ($config['ntpd']['restrictions']['row'] as $v) { |
|
40 |
if (isset($v['noquery'])) { |
|
41 |
continue; |
|
42 |
} |
|
43 |
if (ip_in_subnet($_SERVER['REMOTE_ADDR'], $v['acl_network'].'/'.$v['mask'])) { |
|
44 |
$allow_query = true; |
|
45 |
} |
|
46 |
} |
|
47 |
} |
|
48 |
|
|
49 |
if ($allow_query) { |
|
37 | 50 |
if (isset($config['system']['ipv6allow'])) { |
38 | 51 |
$inet_version = ""; |
39 | 52 |
} else { |
... | ... | |
192 | 205 |
} |
193 | 206 |
|
194 | 207 |
function print_status() { |
195 |
global $config, $ntpq_servers; |
|
208 |
global $config, $ntpq_servers, $allow_query;
|
|
196 | 209 |
|
197 |
if (isset($config['ntpd']['noquery'])):
|
|
210 |
if (!$allow_query):
|
|
198 | 211 |
|
199 | 212 |
print("<tr>\n"); |
200 | 213 |
print('<td class="warning" colspan="11">'); |
Also available in: Unified diff
Fixed NTP status page not honouring NTP ACLs
Reported in redmine https://redmine.pfsense.org/issues/7609