From 9a8c3eeb15e12160d9dd9dbcda8f6e4fa26126ba Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Tue, 24 Feb 2009 17:23:16 -0800 Subject: Limit firewall name to 29 characters since that is the iptables/ip6tables limit. --- templates/firewall/ipv6-modify/node.def | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'templates/firewall/ipv6-modify/node.def') 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 -- cgit v1.2.3