summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-07-20 18:02:30 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-07-20 18:02:30 -0700
commita66d453b9f8e6011dabbf7f3c82090102174e90d (patch)
tree0c04739deed74e162bbc704bf845eea13d692c89
parent869a41037d7b291ec7dd0abb0b70f8861a097a13 (diff)
downloadvyatta-cfg-qos-a66d453b9f8e6011dabbf7f3c82090102174e90d.tar.gz
vyatta-cfg-qos-a66d453b9f8e6011dabbf7f3c82090102174e90d.zip
Move redirect/mirror interface name tests to commit step
The interface target may not exist during the syntax checking. If it is an ifb device it is created as part of a previous transaction.
-rw-r--r--interface-templates/mirror/node.def5
-rw-r--r--interface-templates/redirect/node.def4
2 files changed, 5 insertions, 4 deletions
diff --git a/interface-templates/mirror/node.def b/interface-templates/mirror/node.def
index b4b5b38..599ccec 100644
--- a/interface-templates/mirror/node.def
+++ b/interface-templates/mirror/node.def
@@ -6,13 +6,14 @@ syntax:expression: $VAR(@) != $VAR(../@) ;\
"interface $VAR(../@): mirroring to same interface not allowed"
val_help: Interface for packet mirroring
-syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(@) --check=all"
-
commit:expression: $VAR(../redirect) == ""; \
"interface $VAR(../@) : can not redirect and mirror on $IFNAME"
commit:expression: $VAR(../traffic-policy/in) == ""; \
"interface $VAR(../@) : can not use ingress policy and mirror on $IFNAME"
+commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(@) --check=all"
+
+
update: /opt/vyatta/sbin/vyatta-qos.pl --update-action $IFNAME
delete: /opt/vyatta/sbin/vyatta-qos.pl --delete-action $IFNAME
diff --git a/interface-templates/redirect/node.def b/interface-templates/redirect/node.def
index 9dfbf09..c836662 100644
--- a/interface-templates/redirect/node.def
+++ b/interface-templates/redirect/node.def
@@ -6,13 +6,13 @@ syntax:expression: $VAR(@) != $VAR(../@) ;\
"interface $VAR(../@): redirect to same interface not allowed"
val_help: Interface for packet redirection
-syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(@) --check=all"
-
commit:expression: $VAR(../mirror) == "";\
"interface $VAR(../@) : can not redirect and mirror on $IFNAME"
commit:expression: $VAR(../traffic-policy/in) == ""; \
"interface $VAR(../@) : can not use ingress policy and redirect on $IFNAME"
+commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(@) --check=all"
+
update: /opt/vyatta/sbin/vyatta-qos.pl --update-action $IFNAME
delete: /opt/vyatta/sbin/vyatta-qos.pl --delete-action $IFNAME