summaryrefslogtreecommitdiff
path: root/templates-cfg
diff options
context:
space:
mode:
authorMohit Mehta <mohit@vyatta.com>2011-06-16 12:46:06 -0700
committerMohit Mehta <mohit@vyatta.com>2011-06-16 12:46:06 -0700
commitdfa0b5ee3b2578ddc62b19c00b7be1711b89f47e (patch)
treef00f09d39f67f9c7efc480f4ba02b0ca940037fe /templates-cfg
parentb669522658191e14f134fe922b21315d7854c043 (diff)
downloadvyatta-zone-dfa0b5ee3b2578ddc62b19c00b7be1711b89f47e.tar.gz
vyatta-zone-dfa0b5ee3b2578ddc62b19c00b7be1711b89f47e.zip
Bug 7154 Priority inversion error when deleting zone policy
* Inverted Zone priorities to comply with new commit implementation. Previously, Zone priorities were: 245 zone-policy/zone/node.tag/from # after firewall, content-inspection 250 zone-policy # after zone-policy/zone/node.tag/from/ Now, Zone priorities look like this: 250 zone-policy # after firewall, content-inspection 251 zone-policy/zone/node.tag/from # after zone-policy This required an in-depth look at all zone-policy templates and all of Zone FW and IPS code to make sure that all of the different combinations of actions under zone-policy still work right. The combination of actions that needed most attention are the ones where actions in one priority are executed in the same commit as actions in other priority. Example "deleting the only interface in a zone and also, modifying firewall ruleset from that zone to another zone and deleting content-inspection from that zone to another zone" vyatta@vDUT-5# compare [edit zone-policy zone dmz] -interface eth0 [edit zone-policy zone lan from dmz] -content-inspection { - enable -} [edit zone-policy zone lan from dmz firewall] >name allow_all_another [edit]
Diffstat (limited to 'templates-cfg')
-rw-r--r--templates-cfg/zone-policy/node.def2
-rw-r--r--templates-cfg/zone-policy/zone/node.tag/from/node.def32
2 files changed, 5 insertions, 29 deletions
diff --git a/templates-cfg/zone-policy/node.def b/templates-cfg/zone-policy/node.def
index 52a6b68..d5ca5cb 100644
--- a/templates-cfg/zone-policy/node.def
+++ b/templates-cfg/zone-policy/node.def
@@ -1,4 +1,4 @@
-priority: 250 # after zone-policy/zone/node.tag/from/
+priority: 250 # after firewall, content-inspection
help: Configure zone-policy
diff --git a/templates-cfg/zone-policy/zone/node.tag/from/node.def b/templates-cfg/zone-policy/zone/node.tag/from/node.def
index 62cd3cb..7691fba 100644
--- a/templates-cfg/zone-policy/zone/node.tag/from/node.def
+++ b/templates-cfg/zone-policy/zone/node.tag/from/node.def
@@ -1,5 +1,5 @@
tag:
-priority: 245 # after firewall, content-inspection
+priority: 251 # after zone-policy
type: txt
help: Zone from which to filter traffic
@@ -9,9 +9,9 @@ allowed:
echo -n "${zones[@]}"
begin:
-if ! /opt/vyatta/sbin/vyatta-zone.pl \
- --action=validity-checks \
- --zone-name=none \
+if ! /opt/vyatta/sbin/vyatta-zone.pl \
+ --action=validity-checks \
+ --zone-name=none \
--silent-validate=true; then
exit 1
fi
@@ -35,28 +35,4 @@ create:
if [ $found -eq 0 ]; then
echo Undefined from zone [$VAR(@)] under zone $parent_zone
exit 1
- else
- # fw zone actions
- if ! /opt/vyatta/sbin/vyatta-zone.pl \
- --action=add-zone \
- --zone-name="$parent_zone"; then
- exit 1
- fi
- if ! /opt/vyatta/sbin/vyatta-zone.pl \
- --action=add-zone \
- --zone-name="$VAR(@)"; then
- exit 1
- fi
-
- # ips zone actions
- if ! /opt/vyatta/sbin/vyatta-zone-ips.pl \
- --action=add-zone \
- --zone-name="$parent_zone"; then
- exit 1
- fi
- if ! /opt/vyatta/sbin/vyatta-zone-ips.pl \
- --action=add-zone \
- --zone-name="$VAR(@)"; then
- exit 1
- fi
fi