summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2014-08-02 02:24:26 +0200
committerDaniil Baturin <daniil@baturin.org>2014-08-02 02:24:26 +0200
commita416c3b7425434146707fb4c3c569b190055e4f6 (patch)
tree2f30e430509ba3417123d79c4bd4f274ba8e8850
parent47ea4b57db79cef89d2fdeb62b00b0a0bd9e6094 (diff)
downloadvyatta-cfg-firewall-a416c3b7425434146707fb4c3c569b190055e4f6.tar.gz
vyatta-cfg-firewall-a416c3b7425434146707fb4c3c569b190055e4f6.zip
Bug #115: disallow reserved firewall names in CLI validation.
-rw-r--r--templates/firewall/name/node.def3
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/firewall/name/node.def b/templates/firewall/name/node.def
index c48eb6d..484d637 100644
--- a/templates/firewall/name/node.def
+++ b/templates/firewall/name/node.def
@@ -11,6 +11,9 @@ syntax:expression: pattern $VAR(@) "^[^|;&$<>]*$" ; \
"Firewall rule set name cannot contain shell punctuation"
syntax:expression: ! pattern $VAR(@) "^VZONE" ; \
"Firewall rule set name cannot start with 'VZONE'"
+syntax:expression: ! pattern $VAR(@) "(PREROUTING|POSTROUTING|CONNMARK|MARK\
+ FILTER|FORWARD|INPUT|OUTPUT|VYATTA_.*_HOOK)" ; \
+ "$VAR(@) is a reserved name"
end: if sudo /opt/vyatta/sbin/vyatta-firewall.pl --update-rules "firewall name" "$VAR(@)" ;
then