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

[BUG] Wrong lcp_state flag handling prevents PPP from connecting to peer after peer disconnection/re-connection #2568

Closed
1 task done
lzungri opened this issue Sep 13, 2024 · 3 comments · Fixed by #2571
Closed
1 task done

Comments

@lzungri
Copy link
Contributor

lzungri commented Sep 13, 2024

Description / Steps to reproduce the issue

If a PPP peer disconnects and then tries to reconnect it will send an 'LCP configure request' packet. The code that handles that scenario seems to be clearing the wrong lcp_state flag (LCP_RX_UP instead of LCP_TX_UP) and thus the nuttx ppp client will keep sending IPCP packets which are rightfully dropped by the new peer since it is still in the LCP negotiation phase.

Consider replacing this code:

ctx->lcp_state &= ~LCP_RX_UP;

with:

ctx->lcp_state &= ~LCP_TX_UP;

Source here:

ctx->lcp_state &= ~LCP_RX_UP;

I can create a PR if that helps.

On which OS does this issue occur?

[Linux]

What is the version of your OS?

Ubuntu

NuttX Version

12.6

Issue Architecture

[all]

Issue Area

[Networking]

Verification

  • I have verified before submitting the report.
@xiaoxiang781216
Copy link
Contributor

@lzungri could you provide a patch?

@lzungri
Copy link
Contributor Author

lzungri commented Sep 13, 2024

PR here #2571

@cederom
Copy link

cederom commented Sep 13, 2024

Thank you @lzungri :-) Patch just need minor comment formatting adjustment to pass CI, lets continue on PR thread :-)

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

Successfully merging a pull request may close this issue.

3 participants