Skip to content

Conversation

@lzungri
Copy link
Contributor

@lzungri lzungri commented Sep 13, 2024

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.

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.
@cederom
Copy link
Contributor

cederom commented Sep 13, 2024

@lzungri
Copy link
Contributor Author

lzungri commented Sep 14, 2024

You have tested the patch and it fixes the issue in practice with various different setups? Please add short testing / verification description / confirmation.

@cederom I have a custom version of the pppd code from nuttx so I have only tested it in my specific setup, which doesn't involve running it under nuttx OS.
My testing involved connecting a linux pppd daemon to my custom nuttx code and confirming that the connection is re-established smoothly after restarting the linux pppd process.

@xiaoxiang781216 xiaoxiang781216 merged commit 0c734ca into apache:master Sep 14, 2024
27 checks passed
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

Successfully merging this pull request may close these issues.

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

3 participants