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

Netgear won't save correctly #2531

Closed
domrcrel opened this issue May 4, 2022 · 0 comments
Closed

Netgear won't save correctly #2531

domrcrel opened this issue May 4, 2022 · 0 comments

Comments

@domrcrel
Copy link
Contributor

domrcrel commented May 4, 2022

Building Oxidized from master and trying to connect to a Netgear host (in my case, Netgear M4300-24X) fails. All the credentials are correct and it can connect to the host over SSH, and is even able to get the config, but still reports a failure.

I believe this is due to not including any pre_logout in netgear.rb. I looked in there and found this:

    # quit / logout will sometimes prompt the user:
    #
    #     The system has unsaved changes.
    #     Would you like to save them now? (y/n)
    #
    # So it is safer simply to disconnect and not issue a pre_logout command

This is correct in a way, as every time I (or Oxidized) connects to the host via SSH this prompt does appear, even if no changes were made. As Oxidized is not here to make changes though, only record them, I don't believe ignoring this is correct. At the moment, the system doesn't logout as no pre_logout is issued, so it hangs onto the connection and times out because of it.

I added the below to my local copy of netgear.rb, after the post_login commands:

    pre_logout 'quit'
    pre_logout 'n'

It now saves the config correctly.

Is there a reason for having the current version behave how it does?

@domrcrel domrcrel changed the title Netgear won't connect Netgear won't save correctly May 4, 2022
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

1 participant