Page MenuHomeVyOS Platform

Config nodes containing spaces which have sub-nodes don't work
Closed, ResolvedPublicBUG


Config nodes that can contain spaces and have sub-nodes end up not working correctly. For instance L2TP and PPTP usernames, and SNMP community string. setLevel in ends up not working in that circumstance, which makes the sub-nodes not function. SNMP in that case ends up with an invalid snmpd.conf. L2TP and PPTP users end up with a blank password.


Difficulty level
Normal (likely a few hours)

Event Timeline

Worse, such config can be saved, but cannot be loaded afterwards because the formatter doesn't bother to quote such strings and you end up with a syntactically invalid config.

I'm afraid there may not be a general solution in 1.x.x, but we can identify tag nodes without validation rules and add some rules to them at least.

syncer removed syncer as the assignee of this task.Aug 1 2017, 4:10 AM
syncer triaged this task as Normal priority.
syncer changed the edit policy from "Task Author" to "Custom Policy".
syncer edited projects, added VyOS 1.2 Crux; removed VyOS 1.1.x.
syncer set Version to -.
syncer edited subscribers, added: Maintainers, Active contributors, Community; removed: dmbaturin.
syncer added a subscriber: syncer.

Do we need to create sub-task per component?

Other vendors put in restrictions for that (cisco for instance allows only alpha numerical characters), that could be done in the xml with a regex to prevent the issue you have raised. I only had a look into the snmp configuration for now, but I expect that on many other places too.
Any objections about restricting the input?

Can please someone assign it to me, I was/am working on that one and opened a subtask since I can't assign this one here tom myself.

syncer changed the subtype of this task from "Task" to "Bug".Oct 18 2018, 5:52 AM

I've finally located the place where tag node output is handled and added quoting analogous to what was always done to leaf node values. Now saved configs should be correct.

@dmbaturin Awesome, I didn't have the time to look into that further. I'm going to test it for sure.