ppp152ptch.txt Patch for PPP 1.5.2 driver for Minix 2.0.2 and 2.0.3 Claudio Tantignone (ctantignone@hotmail.com) 12 Feb 2003 Introduction ============ This patch fix problems in options negotiation at the LCP, CCP and IPCP. This source code ONLY was tested under PPP version 1.5.2 dated 04/19/2002. Check the PPP driver version BEFORE applying the patch. It will be included in a future release of PPP. e-mail me (ctantignone@hotmail.com) if you have some question before applying the patch. Instalation =========== Unpack the source files lcp.c ipcp.c link.c and ccp.c in a temporary directory Replace the source files in PPP driver directory and recompile (make install) Description =========== ppp.drv send a packet for negotiation and wait for acknowledge. All the packets have an identification number. If peer send some other packet (negotiation is two independient way process), and ppp.drv has no acknowledge, it sends a new negotiation packet, and increment the identifier number. Also it saves the id number that must be send by peer as ack. In this situation, we can have a loop. In example, peer send acknowledge for packet with id 8 and ppp.drv is waiting for id 9. In this situation, ppp.drv ignores the ack packet and send a new one. When the loop arrives to the internal limit (default 10), it disconect the comunication. Sometimes if you use DEBUG or have more activity (like logging in a file) Minix is slow and the acknowledge arrives at time. In this situation the handshake works fine because there are no timing problems. The patch modifies the loop. If ppp.drv receives an acknowledge packet with id lower than current, it does not send a new one in this moment waiting that the next packet will have the rigth id. This is only applied if we receive ack, not in nack packets or rejects. If id number is bigger than current expected, it is ignored because it is an erroneous packet. The situation is similar in LCP, IPCP and CCP so I applied the same patch in the three source files. A second bug appeared if you do not set a local IP address with ifconfig, and ppp.drv negotiates an IP with peer. In the comparation the code automatically sets address translation, but local IP is not set and also headers are forced to use IP address 0.0.0.0. Acknowledge =========== Thanks to Thomas Miller (tmiller@flex.com) who reported the problems and help me testing the solution (Febrery 2003).