diff options
author | Guillaume Mazoyer <gmazoyer@gravitons.in> | 2016-06-13 11:23:09 +0200 |
---|---|---|
committer | Guillaume Mazoyer <gmazoyer@gravitons.in> | 2016-06-13 11:23:09 +0200 |
commit | 931788ad45b4f1114e97e6ac2869ab84efa767e2 (patch) | |
tree | 6d93fee8a118e67843222278e0cbe95494d8b74d /execute.php | |
parent | 669fb2ebd03ac5e9b0806acb1c200e71e69b3d47 (diff) |
Per router options to disable/enable IP versions.
Remove the global options to disable/enable IPv6 or IPv4. These options can
now be used on the router configuration level, which seems more appropriate.
Diffstat (limited to 'execute.php')
-rw-r--r-- | execute.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/execute.php b/execute.php index 227c6e6..7fd8fc6 100644 --- a/execute.php +++ b/execute.php @@ -54,15 +54,15 @@ if (isset($_POST['query']) && !empty($_POST['query']) && $router = Router::instance($hostname, $requester); // Check if parameter is an IPv6 and if IPv6 is disabled - if (match_ipv6($parameter) && $config['misc']['disable_ipv6']) { - $error = 'IPv6 has been disabled, you can only use IPv4.'; + if (match_ipv6($parameter) && $router->get_config()['disable_ipv6']) { + $error = 'IPv6 has been disabled for this router, you can only use IPv4.'; print(json_encode(array('error' => $error))); return; } // Check if parameter is an IPv4 and if IPv4 is disabled - if (match_ipv4($parameter) && $config['misc']['disable_ipv4']) { - $error = 'IPv4 has been disabled, you can only use IPv6.'; + if (match_ipv4($parameter) && $router->get_config()['disable_ipv4']) { + $error = 'IPv4 has been disabled for this router, you can only use IPv6.'; print(json_encode(array('error' => $error))); return; } |