Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSPFv3 (IPv6) - Parser takes user to (config-if) instead of rejecting, when incomplete "interface" cmd is entered #341

Closed
jhiggins-NZ opened this issue Apr 6, 2017 · 1 comment

Comments

@jhiggins-NZ
Copy link

jhiggins-NZ commented Apr 6, 2017

Issue: (Potential Issue)

  • Parser logic is to take user to the (config-if) mode, since the interface syntax matches.
  • However in this case, it is a component in the interface command (OSPFv3 for IPv6).
  • Possibly expected that the % Command incomplete message is returned in this case.

.
.

Setup:

  • FRR-2.0 on CentOS 7.

.
.

Example:

CentOS(config)# router ospf6
CentOS(config-ospf6)# router-id 1.1.1.1
CentOS(config-ospf6)# interface 
  IFNAME  Interface name(e.g. ep0)

CentOS(config-ospf6)# interface ens33        <-- If ? is used
  area  Specify the OSPF6 area ID

CentOS(config-ospf6)# interface ens33         <-- If character return is enacted, config hierarchy changes
CentOS(config-if)#
@jhiggins-NZ jhiggins-NZ changed the title OSPFv3 (IPv6) - Parser takes user to (if-config) instead of rejecting, when incomplete "interface" cmd is entered OSPFv3 (IPv6) - Parser takes user to (config-if) instead of rejecting, when incomplete "interface" cmd is entered Apr 6, 2017
@qlyoung
Copy link
Member

qlyoung commented Apr 6, 2017

Hey there, thanks for pointing this out.

When you enter a command that's invalid for the current mode, the CLI will 'walk up' to parent nodes and attempt to execute the command in those contexts. If the command succeeds, the current mode changes to the mode where the command was successful, and executes the command there. What's happening here is that while interface ens33 is not valid for the ospf6 config mode, it is valid for the top level configuration mode (with prompt (config)). So the CLI changes modes to that mode, executes the command, and then by the action of the interface command, you enter the interface configuration mode.

This behavior has been around for a long time. We recognize that it can be confusing at times, and we are looking at ways to improve it. Unfortunately in this instance, it's behaving as expected, so I'm closing this issue for now; whatever solution we come up with for the bigger issue at hand will hopefully address this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants