Project

General

Profile

Actions

Bug #4045

closed

vty: incomplete commands accepted in multi-choice token

Added by pespin almost 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
libosmovty
Target version:
-
Start date:
06/05/2019
Due date:
% Done:

100%

Spec Reference:

Description

See issue described in https://gerrit.osmocom.org/c/osmo-sgsn/+/14195

For example, the following command definition:

auth-policy (accept-all|closed|acl-only|remote)

actually permits the following variations:

  auth-policy accept-all
  auth-policy accept
  auth-policy acl
  auth-policy re
  auth-policy c

So it seems in those cases, the matched VTY command (the DEFUN function ) will be passed with the incomplete sting instead of the full accepted string (eg: "re" instead of "remote).

That must be avoided and once "re" is matched to be "remote", "remote" should be passed inside argv[] instead of "re". Otherwise complexity of VTY commands parsing grows incredibly and makes no sense to have that logic duplicated in every cmd.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)