Page MenuHomeVyOS Platform

op-mode reset vpn command shows wrong completion
Resolved (N/A)PublicBUG

Description

Completions for the command reset vpn remote-access user show files in the current directory

vyos@RTR1# pwd
/home/vyos
[edit]
vyos@RTR1# ls
file1  file2  file3
[edit]
vyos@RTR1# run reset vpn remote-access user 
Possible completions:
  file1         Terminate specified user's current remote access VPN session(s)
  file2
  file3

Details

Difficulty level
Unknown (require assessment)
Version
1.2.6-epa1
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

Unknown Object (User) created this task.Sep 14 2020, 9:13 PM
syncer renamed this task from Reset vpn commands show wrong complation to op-mode reset vpn command shows wrong completion.Sep 14 2020, 9:37 PM
syncer triaged this task as Normal priority.

PR https://github.com/vyos/vyatta-ravpn/pull/16

Files in home directory

[email protected]:~$ sudo ls -l /home/vyos/
total 28
-rw-r--r-- 1 root root      0 Sep 22 07:23 test1
-rw-r--r-- 1 root root      0 Sep 22 07:23 test2
-rw-r--r-- 1 root root      0 Sep 22 07:23 test3
-rwxr-xr-x 1 root root    390 Sep 22 10:23 test.sh
-rw-r--r-- 1 vyos users 24384 Sep 22 10:31 vyatta-ravpn_1.2.6_all.deb

Show current sessions

[email protected]:~$ show vpn remote-access 
Active remote access VPN sessions:

User            Proto Iface     Tunnel IP       TX byte RX byte  Time 
----            ----- -----     ---------       ------- -------  ---- 
user02          PPTP  pptp0     192.168.0.11        288     218  00h15m18s
user01          PPTP  pptp1     192.168.0.10        288     218  00h29m17s

reset

[email protected]:~$ reset vpn remote-access user 
Possible completions:
  user01        Terminate specified user's current remote access VPN session(s)
  user02

      
[email protected]:~$
Unknown Object (User) changed the task status from Open to In progress.Oct 19 2020, 11:30 AM
Unknown Object (User) assigned this task to Viacheslav.

It looks like this works, but when we don't have any connected user, it listed the current directory file

vyos@RTR1:~$ touch 1.txt
vyos@RTR1:~$ reset vpn remote-access user <tab>
Possible completions:
  1.txt         Terminate specified user's current remote access VPN session(s)

After a user connected, all works properly

vyos@RTR1:~$ reset vpn remote-access user <tab>
Possible completions:
  test1         Terminate specified user's current remote access VPN session(s)

@Dmitry I can't reproduce it anymore VyOS 1.2.7

vyos@r2-lts:~$ touch tttt.txt
vyos@r2-lts:~$ ls
1.txt  foo.txt  ntp.conf  ntp.conf.2021-05-13-1945.pre-migration  ntp.conf.2021-05-13-2107.pre-migration  test.py  test.txt  tttt.txt  [email protected]
vyos@r2-lts:~$ 
vyos@r2-lts:~$ reset vpn remote-access user 
Possible completions:
  <text>        Terminate specified user's current remote access VPN session(s)
Unknown Object (User) added a comment.Jun 29 2021, 6:17 PM

@Viacheslav it is reproducible in 1.2.7

vyos@vyos:~$ touch file1
vyos@vyos:~$ touch file2
vyos@vyos:~$ touch file3
vyos@vyos:~$ ls
file1  file2  file3
vyos@vyos:~$ reset vpn remote-access user 
Possible completions:
  file1         Terminate specified user's current remote access VPN session(s)
  file2
  file3

      
vyos@vyos:~$ show version | match Version
Version:          VyOS 1.2.7

1.3.5 fixed

vyos@r1:~$ reset vpn remote-access user 
Possible completions:
  <text>        Terminate specified users current remote access VPN session(s)