summaryrefslogtreecommitdiff
path: root/src/vyos1x_parser.mly
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2022-06-28 13:14:18 -0500
committerJohn Estabrook <jestabro@vyos.io>2022-06-28 14:08:21 -0500
commit4df07f8e286ebfacb70c87ee499a4d2c42b772e9 (patch)
tree79b2f5b134ecdedc8b1f8c0240f6f9fa7c417eb2 /src/vyos1x_parser.mly
parent46bb0a821b4db8f97e89367bec45a75287234994 (diff)
downloadvyos1x-config-4df07f8e286ebfacb70c87ee499a4d2c42b772e9.tar.gz
vyos1x-config-4df07f8e286ebfacb70c87ee499a4d2c42b772e9.zip
T4491: use empty string for name of config_tree root node
The practice of using "root" for the internal name of the root node collides with actual nodes named "root", due to a utility function that checks 'if root' by name. Use empty string as name of root node, as no actual node will match.
Diffstat (limited to 'src/vyos1x_parser.mly')
-rw-r--r--src/vyos1x_parser.mly2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vyos1x_parser.mly b/src/vyos1x_parser.mly
index c31552f..ba1c5a7 100644
--- a/src/vyos1x_parser.mly
+++ b/src/vyos1x_parser.mly
@@ -103,7 +103,7 @@ node_content: n = node { n } | n = leaf_node { n } | n = tag_node { n };
%public config:
| ns = list(node_content); EOF
{
- let root = make "root" in
+ let root = make "" in
let root = List.fold_left Vytree.adopt root (List.rev ns) |> Vytree.merge_children merge_data in
try
List.iter find_duplicate_children (Vytree.children_of_node root);