You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/09/14 05:49:14 UTC
(nuttx-apps) branch master updated (f96461c38 -> 0c734ca62)
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
from f96461c38 cmake:refine libyuv CMakeLists
new 800b93de9 ppp: Fix wrong lcp_state handling on peer reconnection
new 0c734ca62 ppp: Reformat to match nuttx coding style
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
netutils/pppd/lcp.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
(nuttx-apps) 01/02: ppp: Fix wrong lcp_state handling on peer reconnection
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 800b93de9fd091f8cc03cd442350e027f8eedce3
Author: Leandro Zungri <lz...@gmail.com>
AuthorDate: Fri Sep 13 09:48:15 2024 -0700
ppp: Fix wrong lcp_state handling on peer reconnection
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.
---
netutils/pppd/lcp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/netutils/pppd/lcp.c b/netutils/pppd/lcp.c
index 069e4327a..4637a7a4a 100644
--- a/netutils/pppd/lcp.c
+++ b/netutils/pppd/lcp.c
@@ -135,7 +135,11 @@ void lcp_rx(struct ppp_context_s *ctx, uint8_t * buffer, uint16_t count)
/* In case of new peer connection */
ipcp_init(ctx);
- ctx->lcp_state &= ~LCP_RX_UP;
+
+ /* Clear LCP state to keep it in negotiation phase. LCP_TX_UP will be re-set
+ * once a CONF_ACK is received. */
+
+ ctx->lcp_state &= ~LCP_TX_UP;
DEBUG1(("received [LCP Config Request id %u\n", id));
if (scan_packet
(nuttx-apps) 02/02: ppp: Reformat to match nuttx coding style
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 0c734ca62b96391b25a077229d04da66149391b1
Author: Leandro Zungri <lz...@gmail.com>
AuthorDate: Fri Sep 13 19:00:22 2024 -0700
ppp: Reformat to match nuttx coding style
---
netutils/pppd/lcp.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/netutils/pppd/lcp.c b/netutils/pppd/lcp.c
index 4637a7a4a..65d50343b 100644
--- a/netutils/pppd/lcp.c
+++ b/netutils/pppd/lcp.c
@@ -135,10 +135,11 @@ void lcp_rx(struct ppp_context_s *ctx, uint8_t * buffer, uint16_t count)
/* In case of new peer connection */
ipcp_init(ctx);
-
- /* Clear LCP state to keep it in negotiation phase. LCP_TX_UP will be re-set
- * once a CONF_ACK is received. */
-
+
+ /* Clear LCP state to keep it in negotiation phase. LCP_TX_UP will be
+ * re-set once a CONF_ACK is received.
+ */
+
ctx->lcp_state &= ~LCP_TX_UP;
DEBUG1(("received [LCP Config Request id %u\n", id));