Project

General

Profile

Bug #4045

Updated by pespin about 1 month ago

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

For example, the following command definition:
<pre>
auth-policy (accept-all|closed|acl-only|remote) (accept-all|closed|acl-only|remote)"
</pre>

actually permits the following variations:
<pre>
auth-policy accept-all
auth-policy accept
auth-policy acl
auth-policy re
auth-policy c
</pre>

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.

Back

Add picture from clipboard (Maximum size: 48.8 MB)