summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-06-09 10:45:46 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-06-09 10:45:46 -0700
commitded90a0249827911e86c343ad67ae0d2074b6008 (patch)
tree12390504261d2139918d3fd8de7dcf1162b1d4fa
parent31a8ab66f49ad26b376d552ec468b21e15835daf (diff)
downloadvyatta-cfg-qos-ded90a0249827911e86c343ad67ae0d2074b6008.tar.gz
vyatta-cfg-qos-ded90a0249827911e86c343ad67ae0d2074b6008.zip
Block attempts to mirror/redirect to self
-rw-r--r--interface-templates/mirror/node.def3
-rw-r--r--interface-templates/redirect/node.def4
2 files changed, 7 insertions, 0 deletions
diff --git a/interface-templates/mirror/node.def b/interface-templates/mirror/node.def
index cbb3bde..f19ae06 100644
--- a/interface-templates/mirror/node.def
+++ b/interface-templates/mirror/node.def
@@ -2,6 +2,9 @@ type: txt
help: Set incoming packet mirroring destination
allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --skip=$IFNAME --show=all
+syntax: $VAR(@) != $VAR(../@) ;\
+ "interface $VAR(../@): mirroring to same interface not allowed"
+
syntax: /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$IFNAME --check=all
commit:expression: $VAR(../redirect) == ""; \
diff --git a/interface-templates/redirect/node.def b/interface-templates/redirect/node.def
index 6f0bd60..e94e8a8 100644
--- a/interface-templates/redirect/node.def
+++ b/interface-templates/redirect/node.def
@@ -2,7 +2,11 @@ type: txt
help: Set incoming packet redirection destination
allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --skip=$IFNAME --show=all
+syntax: $VAR(@) != $VAR(../@) ;\
+ "interface $VAR(../@): redirect to same interface not allowed"
+
syntax: /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$IFNAME --check=all
+
commit:expression: $VAR(../mirror) == "";\
"interface $VAR(../@) : can not redirect and mirror on $IFNAME"