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

UPS_Network.AuthLogin does not send LOGIN #100

Closed
dylan-kerr opened this issue Sep 19, 2021 · 2 comments
Closed

UPS_Network.AuthLogin does not send LOGIN #100

dylan-kerr opened this issue Sep 19, 2021 · 2 comments

Comments

@dylan-kerr
Copy link

AuthLogin sends the USERNAME and PASSWORD messages, which is sufficient for authentication of subsequent commands, but does not send the LOGIN message. This means that the UPS server does not associate this client with a particular UPS.

In practice, I observed this issue when the UPS goes into the FSD state - the primary/master upsmon on the UPS server sees that there are no secondary/slave clients and immediately shuts down the UPS without waiting for WinNUT-Client to notice the FSD flag and shut itself down.

I think I can see how to add the LOGIN step to AuthLogin, but wanted to raise this issue for discussion about how this should be done. From inspection of the upsd code this should be a safe change when the UPS server is https://github.com/networkupstools/nut, but other servers might have different LOGIN semantics (the protocol document doesn't explicitly specify when LOGIN should or should not be called).
Should calling LOGIN be configurable, perhaps with a checkbox in the server settings? Or can we consider it a core part of the protocol that users shouldn't need to opt in or out of?

Thanks and regards,
Dylan

@gbakeman
Copy link
Contributor

Thank you for your contribution @dylan-kerr ! I'm sorry you went through the trouble, but we're in the middle of implementing a library that's going to abstract away most of the protocol functionality. Proper LOGIN/LOGOUT support will be one thing that's added. Hopefully we can address your issue soon.

@dylan-kerr
Copy link
Author

Ok, good to know. I'll continue running my fork for now and look forward to seeing the new version!

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