summaryrefslogtreecommitdiff
path: root/includes/config.defaults.php
diff options
context:
space:
mode:
authorGuillaume Mazoyer <gmazoyer@gravitons.in>2016-06-13 11:23:09 +0200
committerGuillaume Mazoyer <gmazoyer@gravitons.in>2016-06-13 11:23:09 +0200
commit931788ad45b4f1114e97e6ac2869ab84efa767e2 (patch)
tree6d93fee8a118e67843222278e0cbe95494d8b74d /includes/config.defaults.php
parent669fb2ebd03ac5e9b0806acb1c200e71e69b3d47 (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 'includes/config.defaults.php')
-rw-r--r--includes/config.defaults.php22
1 files changed, 17 insertions, 5 deletions
diff --git a/includes/config.defaults.php b/includes/config.defaults.php
index dfc0d58..fa17f66 100644
--- a/includes/config.defaults.php
+++ b/includes/config.defaults.php
@@ -24,6 +24,22 @@
* Make changes to the configuration array in config.php.
*/
+function set_defaults_for_routers(&$parsed_config) {
+ $router_defaults = array(
+ 'disable_ipv6' => false,
+ 'disable_ipv4' => false
+ );
+
+ // Loads defaults when key does not exist
+ foreach ($parsed_config['routers'] as &$router) {
+ foreach ($router_defaults as $key => $value) {
+ if (!array_key_exists($key, $router)) {
+ $router[$key] = $value;
+ }
+ }
+ }
+}
+
$config = array(
// Release configuration
@@ -92,11 +108,7 @@ $config = array(
'allow_private_ip' => true,
// Allow reserved IPv4 addresses (0.0.0.0/8, 169.254.0.0/16,
// 192.0.2.0/24 and 224.0.0.0/4)
- 'allow_reserved_ip' => true,
- // Disable IPv6
- 'disable_ipv6' => false,
- // Disable IPv4
- 'disable_ipv4' => false
+ 'allow_reserved_ip' => true
),
// Tools used for some processing