summaryrefslogtreecommitdiff
path: root/templates/system
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-17 09:24:54 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-17 11:25:31 -0800
commit5f69f227f7cf0cb2f60330e9157015abfe25ee8c (patch)
tree05ce39344da985cc5ed4b178e16c91dd20cfaeca /templates/system
parentdda7d0d8b1d519e2e2ce5e1b3f46bb6a6791a412 (diff)
downloadvyatta-cfg-system-5f69f227f7cf0cb2f60330e9157015abfe25ee8c.tar.gz
vyatta-cfg-system-5f69f227f7cf0cb2f60330e9157015abfe25ee8c.zip
Allow longer domain-name values
Bug 6243 Change syntax checking for domain name. Don't enforce length restrictions since that is checked already elsewhere and may change. Do enforce the RFC 2181 character set values.
Diffstat (limited to 'templates/system')
-rw-r--r--templates/system/domain-name/node.def4
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/system/domain-name/node.def b/templates/system/domain-name/node.def
index ff3c2ebf..e5d5af7e 100644
--- a/templates/system/domain-name/node.def
+++ b/templates/system/domain-name/node.def
@@ -1,7 +1,9 @@
priority: 400
type: txt
help: System domain name
-syntax:expression: pattern $VAR(@) "^[-a-zA-Z0-9.]{0,63}$" ; "invalid domain name $VAR(@)"
+
+# Allow letter-number-hyphen in label (but can not start or end with hyphen)
+syntax:expression: pattern $VAR(@) "^[a-zA-Z0-9](([-a-zA-Z0-9]*[a-zA-Z0-9])?\.)*[a-zA-Z]+$" ; "invalid domain name $VAR(@)"
# also add localhost line into /etc/hosts (see host-name template)?
update: sudo /opt/vyatta/sbin/vyatta_update_resolv.pl