daniel-geotab opened a new pull request, #3203: URL: https://github.com/apache/nuttx-apps/pull/3203
Reverts apache/nuttx-apps#2571 This patch incorrectly mixed up the LCP state variables. From: https://www.eit.lth.se/ppplab/PPPdocs/PPPLCPoverview.htm > The LCP negotiation is a series of LCP packets exchanged between PPP peers to negotiate a set of options and option values when sending data. The LCP negotiation is actually two separate dialogs between two PPP peers (Peer 1 and Peer 2): > > 1. Peer 1 asks, negotiates, and then receives confirmation of the LCP options that are used when sending data to Peer 2. This dialog starts with Peer 1 sending a Configure-Request message and ends when Peer 2 sends a Configure-Ack message. > > 2. Peer 2 asks, negotiates, and then receives confirmation of the LCP options that are used when sending data to peer 1. This dialog starts with Peer 2 sending a Configure-Request message and ends when Peer 1 sends a Configure-Ack message. The Nuttx App is peer 1 in this description. We send a CONF_REQ (in lcp_task DEBUG1(("\nSending LCP request packet - "));) and set LCP_TX_UP when we receive a CONF_ACK indicating we are ok to send because peer 2 accepted our CONF_REQ. We also (in parallel) receive a CONF_REQ from peer 2 and set LCP_RX_UP when we send a CONF_ACK indicating we are good to receive because we accepted the request from peer 2. The PR I am reverting incorrectly clears LCP_TX_UP when receiving a CONF_REQ claiming: "Clear LCP state to keep it in negotiation phase. LCP_TX_UP will be re-set once a CONF_ACK is received." but this is not true. We are not expecting a CONF_ACK because we are the one to be sending the CONF_ACK in this half of the exchange. It was correct to be clearing LCP_RX_UP. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
