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

vtysh: clean vtysh_file_locked when exiting config node #14813

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

idryzhov
Copy link
Contributor

The flag should be cleared to make sure it's not reused the next time we enter the config node.

The flag should be cleared to make sure it's not reused the next time
we enter the config node.

Signed-off-by: Igor Ryzhov <[email protected]>
@idryzhov
Copy link
Contributor Author

@Mergifyio backport stable/9.1

Copy link

mergify bot commented Nov 17, 2023

backport stable/9.1

✅ Backports have been created

@@ -2396,14 +2397,18 @@ static int vtysh_exit(struct vty *vty)
vty->node = cnode->parent_node;

if (vty->node == CONFIG_NODE) {
bool locked = vty->vtysh_file_locked;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the point of adding a bool here? Why isn't the if (vty->vtysh_file_locked) sufficient?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vty->vtysh_file_locked will be overwritten by vtysh_execute("end") on the next line. We need to remember it.

@donaldsharp donaldsharp merged commit 83cbdcc into FRRouting:master Nov 20, 2023
81 checks passed
donaldsharp added a commit that referenced this pull request Nov 21, 2023
vtysh: clean vtysh_file_locked when exiting config node (backport #14813)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants