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

Need to delete connections with bad authentication data #106

Closed
jimmy232 opened this issue Mar 29, 2020 · 16 comments
Closed

Need to delete connections with bad authentication data #106

jimmy232 opened this issue Mar 29, 2020 · 16 comments
Labels
bug Hacktoberfest Suggested activity for DigitalOcean Hacktoberfest

Comments

@jimmy232
Copy link

Hey ya, amazing work you've done so far.

There seems to be an issue when the network password changes without reverting back to AP mode.
It works fine when there is a change in SSID name, as it will fire up AP mode immediately.

Syslog files shows attempts to connect but fails due to 'no-secrets' which I believe is because the network password has changed.

comitup-cli (d) works, but this is a inconvenience to setup again using SSH via ethernet

Any thoughts

@davesteele
Copy link
Owner

As the system is now, the comitup web site should be coming up between connection attempts (2 minutes? - not sure), giving an opportunity to redefine the connection.

Comitup could detect that this is a password rejection, and delete the defined connection with the wrong credentials. That would eliminate the race to get through the config web pages, and would not be too hard to implement.

@jimmy232
Copy link
Author

jimmy232 commented Mar 30, 2020 via email

@davesteele
Copy link
Owner

We can talk about it. My email address is on the davesteele.github.io page.

@davesteele davesteele added the Hacktoberfest Suggested activity for DigitalOcean Hacktoberfest label Oct 1, 2020
@dr3y
Copy link

dr3y commented Oct 2, 2020

Is there any way to increase the time between connection attempts so that the user will have a chance to redefine the network?

@davesteele
Copy link
Owner

If someone is connected to the hotspot, the periodic connection attempts are suspended.

@dr3y
Copy link

dr3y commented Oct 2, 2020

i am having a problem where the hotspot appears for a millisecond and i cannot connect to it before it is gone again.

@davesteele
Copy link
Owner

Is there anything interesting in /var/log/comitup.log, /var/log/comitup-web.log, or NetworkManager entries in /var/log/daemon.log.

@dr3y
Copy link

dr3y commented Oct 2, 2020

I will have a chance to try it later today and I'll update here with what happens

update:
it turns out i had the wrong password after all. but according to the log it was attempting to reconnect every 30 seconds. Sorry I don't have a copy of the log files on hand at the moment

@davesteele davesteele changed the title No AP mode when network password has changed Need to delete connections with bad authentication data Oct 6, 2020
@davesteele davesteele added bug and removed enhancement labels Oct 6, 2020
@davesteele
Copy link
Owner

That's enough information. Thanks.

Comitup needs to delete connections if there is an explicit authentication failure, or handle this case more gracefully.

To those coming to this via Hacktoberfest, the best way to start may be by using the Comitup Image on a Raspberry Pi.

@davesteele
Copy link
Owner

Just tried this, other than the fact that it takes a while for the authentication failure to happen, it appears to be working fine.

To those still seeing this, are you running current code, and are you using web_service?

@davesteele
Copy link
Owner

Current behavior fails the connection, then returns to the HOTSPOT mode for 3 minutes.

davesteele added a commit that referenced this issue May 17, 2021
@sebastianeferrer
Copy link

Hi there! I'm reviving this issue because I'm experiencing what in my opinion is a not expected behaviour of comitup.

It's happen many times that after a power line breakdown, the modem starts up with an incomplete configuration that returns to the client a bad configuration error, but it is only because an inicial mal functioning of the modem.

I think that DELETING the network is fine only if it's the first time you try to connect to it. In the case you already have connected to that network we should delete it, at least trying a couple of times after deleting it.

@davesteele
Copy link
Owner

It just keeps getting more complicated:

  • what should be the response if the upstream password has changed?
  • my wifi router loses its mind at times, manifested by failing authentication. Power cycling is required for recovery, which may not happen for hours. How should that be tolerated?

If any change is to be made, I would lean towards reverting to the "try till oblivion" model.

davesteele added a commit that referenced this issue Jan 17, 2022
Commit #db528bd2 deletes connections with credential failures. This has
caused problems when the upstream AP is booting or otherwise boogered.
Instead, preserve the connection, but backoff the HOTSPOT timeout after
a failed CONNCTING attempt.

This is currently untested.

Addresses #106
@sebastianeferrer
Copy link

oh man! you are great David! thank you so much, I will be testing this today. I'll let you know.

@sebastianeferrer
Copy link

It works great! I would say you can merge it! Thank you so much!

@davesteele
Copy link
Owner

The change is in 1.32-1.

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

No branches or pull requests

4 participants