From: Michal 'vorner' Vaner Date: Mon, 13 Aug 2012 11:08:02 +0000 (+0200) Subject: [2066] Add default values to ACL rules X-Git-Tag: trac2351_base~65^2~34^2^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f533afad3cbb047c6a5d4225720ff7b9dccafbc9;p=thirdparty%2Fkea.git [2066] Add default values to ACL rules It otherwise complained during config add somewhere/acl, that there's no value. The defaults differ from module to module. Also, some reindentation and removal of tabs is added. --- diff --git a/src/bin/ddns/ddns.spec b/src/bin/ddns/ddns.spec index 70611e690f..3061cdc18d 100644 --- a/src/bin/ddns/ddns.spec +++ b/src/bin/ddns/ddns.spec @@ -12,8 +12,8 @@ "item_type": "map", "item_optional": true, "item_default": { - "origin": "", - "class": "IN", + "origin": "", + "class": "IN", "update_acl": [] }, "map_item_spec": [ @@ -33,11 +33,12 @@ "item_name": "update_acl", "item_type": "list", "item_optional": false, - "item_default": [], + "item_default": [], "list_item_spec": { "item_name": "acl_element", "item_type": "any", - "item_optional": true + "item_optional": true, + "item_default": {"action": "REJECT"} } } ] diff --git a/src/bin/resolver/resolver.spec.pre.in b/src/bin/resolver/resolver.spec.pre.in index d6bb22675b..138f4e38bb 100644 --- a/src/bin/resolver/resolver.spec.pre.in +++ b/src/bin/resolver/resolver.spec.pre.in @@ -116,37 +116,23 @@ }, { "item_name": "query_acl", - "item_type": "list", - "item_optional": false, - "item_default": [ - { - "action": "ACCEPT", - "from": "127.0.0.1" - }, - { - "action": "ACCEPT", - "from": "::1" - } - ], - "list_item_spec": { - "item_name": "rule", - "item_type": "map", - "item_optional": false, - "item_default": {}, - "map_item_spec": [ - { - "item_name": "action", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - { - "item_name": "from", - "item_type": "string", - "item_optional": false, - "item_default": "" - } - ] + "item_type": "list", + "item_optional": false, + "item_default": [ + { + "action": "ACCEPT", + "from": "127.0.0.1" + }, + { + "action": "ACCEPT", + "from": "::1" + } + ], + "list_item_spec": { + "item_name": "rule", + "item_type": "any", + "item_optional": false, + "item_default": {"action": "REJECT"} } } ], diff --git a/src/bin/xfrout/xfrout.spec.pre.in b/src/bin/xfrout/xfrout.spec.pre.in index dfcc6d98f4..6b113b0bf2 100644 --- a/src/bin/xfrout/xfrout.spec.pre.in +++ b/src/bin/xfrout/xfrout.spec.pre.in @@ -17,7 +17,8 @@ { "item_name": "acl_element", "item_type": "any", - "item_optional": true + "item_optional": true, + "item_default": {"action": "ACCEPT"} } }, { @@ -80,7 +81,8 @@ { "item_name": "acl_element", "item_type": "any", - "item_optional": true + "item_optional": true, + "item_default": {"action": "ACCEPT"} } } ]