Page MenuHomeVyOS Platform

Shell autocomplete of option (config node) with quoted value doesn't work
Closed, ResolvedPublicBUG

Description

For example:

[edit interfaces openvpn vtun0]
vyos@vyos# show 
(...)
 openvpn-option "tls-crypt /config/auth/tls-auth.key"
(...)
[edit interfaces openvpn vtun0]
vyos@vyos# delete openvpn-option [I pressed Tab here] vbash: ${/config/auth/tls-auth.key[@]}: bad substitution

Possible completions:
   tls-crypt    
   /config/auth/tls-auth.key
                

      
[edit interfaces openvpn vtun0]
vyos@vyos# delete openvpn-option

Details

Difficulty level
Unknown (require assessment)
Version
1.3-rolling-202002161109
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

jjakob created this object in space S1 VyOS Public.
jjakob renamed this task from utocomplete option (config node) with quoted value to Shell autocomplete of option (config node) with quoted value doesn't work.Feb 26 2020, 3:11 PM
jjakob updated the task description. (Show Details)
jjakob changed Version from - to 1.3-rolling-202002161109.

Thats the downside of those nodes which allow passing raw values down the config. I never liked them and they should be removed. The CLI should be extended to support the raw options instead.

Also passing wrong/invalid option will break OpenVPN.

Why not use the real CLI command to pass the TLS cert?

I personally don't mind the raw options, and there are other people using them too (T127, T1246, T1383, T1421, T1430).
There is no option for tls-crypt, just tls-auth. Also I'm experimenting with the various mtu options (tun-mtu, link-mtu, mssfix, fragment) and keepalive options (ping-restart, ping) that can't be set through the existing keepalive options (keepalive doesn't take 0 as a value if I want ping-restart 0 for example, and there's no way to not have keepalive be set with default vaules). So yeah, if all of these options were integrated, I personally wouldn't need the openvpn-options. But I think there are other places that use raw values with quotes that are affected by the autocompletion bug too, dhcp-server for example.

Yes there are definately other places like DHCP.

Would it make sense to add a „tls crypt-file“ CLI option?

jjakob changed the task status from Open to In progress.Feb 29 2020, 2:47 PM
jjakob claimed this task.
jjakob triaged this task as Normal priority.
jjakob moved this task from Need Triage to In Progress on the VyOS 1.3 Equuleus board.
syncer changed the subtype of this task from "Task" to "Bug".Mar 16 2020, 12:32 AM
jjakob changed the task status from In progress to On hold.Mar 20 2020, 9:29 AM

The above commit fixes value help on tab (it displays correct quoted values, the script doesn't error any more) but the completion itself is still broken.

jjakob reopened this task as In progress.Apr 2 2020, 4:39 PM
jjakob moved this task from Finished to In Progress on the VyOS 1.3 Equuleus board.

This PR still needs to be merged: https://github.com/vyos/vyatta-cfg/pull/23

jjakob moved this task from In Progress to Finished on the VyOS 1.3 Equuleus board.
erkin set Issue type to Bug (incorrect behavior).Aug 31 2021, 5:32 PM