mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-12 01:14:41 +08:00
using rp-pppoe pppd exits with EXIT_OK after receiving a timeout waiting for PADO due to no modem attached, from Debian patches
http://ppp.samba.org/cgi-bin/ppp-bugs/incoming?id=2211 Using rp-pppoe pppd exits with exitcode 0, whenever there is no modem connected and pppd get's a timeout while waiting for a PADO. This happens because status is set to EXIT_OK in main.c at the beginning of the procedures. Within start_link(), connect() will be called as one of the first calls. If that call fails (no pppoe discovery for example), jumps to "fail", which returns without setting the status variable to failure. So at the end pppd exits with EXIT_OK. I moved the status = EXIT_NEGOTIATION_FAILED which will be set later within start_link, at the top of it. That seems to work out, patch is attached:
This commit is contained in:
parent
ef59e952d8
commit
d4978210f0
@ -559,6 +559,7 @@ void start_link(unit)
|
||||
{
|
||||
char *msg;
|
||||
|
||||
status = EXIT_NEGOTIATION_FAILED;
|
||||
new_phase(PHASE_SERIALCONN);
|
||||
|
||||
hungup = 0;
|
||||
@ -595,7 +596,6 @@ void start_link(unit)
|
||||
notice("Starting negotiation on %s", ppp_devnam);
|
||||
add_fd(fd_ppp);
|
||||
|
||||
status = EXIT_NEGOTIATION_FAILED;
|
||||
new_phase(PHASE_ESTABLISH);
|
||||
|
||||
lcp_lowerup(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user