summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-09-11 12:59:53 +0200
committerDaniil Baturin <daniil@baturin.org>2018-09-11 12:59:53 +0200
commit1af50ec84a39ef50c9ec5f17b2a7b4a1ce514b2a (patch)
treed26b12a12a62a2e1039c091284c9a87354c58729
parent81f662f716dbc36129957cde5b97284e6e2f4181 (diff)
downloadlibvyosconfig-1af50ec84a39ef50c9ec5f17b2a7b4a1ce514b2a.tar.gz
libvyosconfig-1af50ec84a39ef50c9ec5f17b2a7b4a1ce514b2a.zip
Allow all characters except braces, quotes, and whitespace in "identifiers"
(bare strings that can be either node identifiers or leaf node values). That's required for compatibility with old configs because old configs allow it, for example, "pre-shared secret f%#$!@*&".
-rw-r--r--debian/changelog6
-rw-r--r--parser/vyos1x_lexer.mll2
2 files changed, 7 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index cdfb586..27954ff 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libvyosconfig0 (0.0.3) unstable; urgency=medium
+
+ * Allow all characters except braces, quotes, and whitespace in identifiers.
+
+ -- Daniil Baturin <daniil@baturin.org> Tue, 11 Sep 2018 12:57:39 +0200
+
libvyosconfig0 (0.0.2) unstable; urgency=medium
* Add support for node renaming.
diff --git a/parser/vyos1x_lexer.mll b/parser/vyos1x_lexer.mll
index 1969b91..73bcd83 100644
--- a/parser/vyos1x_lexer.mll
+++ b/parser/vyos1x_lexer.mll
@@ -66,7 +66,7 @@ rule token = parse
{ vy_inside_node := false; LEFT_BRACE }
| '}'
{ vy_inside_node := false; RIGHT_BRACE }
-| [^ ' ' '\t' '\n' '\r' '{' '}' '[' ']' ';' '#' '"' ''' ]+ as s
+| [^ ' ' '\t' '\n' '\r' '{' '}' '"' ''' ]+ as s
{ vy_inside_node := true; IDENTIFIER s}
| eof
{ EOF }