summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@io.vyatta.com>2009-02-24 17:23:16 -0800
committerStig Thormodsrud <stig@io.vyatta.com>2009-02-24 17:23:16 -0800
commit9a8c3eeb15e12160d9dd9dbcda8f6e4fa26126ba (patch)
tree178473cfbec8f3f2857a60fac436cdc9386c06a1
parent7505fdcd0feca189b759306301cac445ec44d525 (diff)
downloadvyatta-cfg-firewall-9a8c3eeb15e12160d9dd9dbcda8f6e4fa26126ba.tar.gz
vyatta-cfg-firewall-9a8c3eeb15e12160d9dd9dbcda8f6e4fa26126ba.zip
Limit firewall name to 29 characters since that is the iptables/ip6tables
limit.
-rw-r--r--templates/firewall/ipv6-modify/node.def6
-rw-r--r--templates/firewall/ipv6-name/node.def6
-rw-r--r--templates/firewall/modify/node.def6
-rw-r--r--templates/firewall/name/node.def6
4 files changed, 24 insertions, 0 deletions
diff --git a/templates/firewall/ipv6-modify/node.def b/templates/firewall/ipv6-modify/node.def
index c0c324d..d49d884 100644
--- a/templates/firewall/ipv6-modify/node.def
+++ b/templates/firewall/ipv6-modify/node.def
@@ -2,6 +2,12 @@ tag:
type: txt
+syntax:expression: exec " \
+ if [ `echo -n $VAR(@) | wc -c` -gt 29 ]; then \
+ echo firewall ipv6-modify must be 29 characters or less; \
+ exit 1 ; \
+ fi ; "
+
syntax:expression: pattern $VAR(@) "^[^-]" ; "Firewall rule set name cannot start with \"-\""
help: Set IPv6 modify rule set name
diff --git a/templates/firewall/ipv6-name/node.def b/templates/firewall/ipv6-name/node.def
index 60880c4..7a6dd1b 100644
--- a/templates/firewall/ipv6-name/node.def
+++ b/templates/firewall/ipv6-name/node.def
@@ -2,6 +2,12 @@ tag:
type: txt
+syntax:expression: exec " \
+ if [ `echo -n $VAR(@) | wc -c` -gt 29 ]; then \
+ echo firewall ipv6-name must be 29 characters or less; \
+ exit 1 ; \
+ fi ; "
+
syntax:expression: pattern $VAR(@) "^[^-]" ; "Firewall rule set name cannot start with \"-\""
help: Set IPv6 firewall rule set name
diff --git a/templates/firewall/modify/node.def b/templates/firewall/modify/node.def
index f01b306..48a25f0 100644
--- a/templates/firewall/modify/node.def
+++ b/templates/firewall/modify/node.def
@@ -2,6 +2,12 @@ tag:
type: txt
+syntax:expression: exec " \
+ if [ `echo -n $VAR(@) | wc -c` -gt 29 ]; then \
+ echo firewall modify must be 29 characters or less; \
+ exit 1 ; \
+ fi ; "
+
syntax:expression: pattern $VAR(@) "^[^-]" ; "Modify rule set name cannot start with \"-\""
help: Set IPv4 modify rule set name
diff --git a/templates/firewall/name/node.def b/templates/firewall/name/node.def
index 628d014..71d4441 100644
--- a/templates/firewall/name/node.def
+++ b/templates/firewall/name/node.def
@@ -2,6 +2,12 @@ tag:
type: txt
+syntax:expression: exec " \
+ if [ `echo -n $VAR(@) | wc -c` -gt 29 ]; then \
+ echo firewall name must be 29 characters or less; \
+ exit 1 ; \
+ fi ; "
+
syntax:expression: pattern $VAR(@) "^[^-]" ; "Firewall rule set name cannot start with \"-\""
help: Set IPv4 firewall rule set name