I recently started having big problems with my ADSL/pppoe connection. When ppp gets tired of not having any LQR feedback, it disconnects:
ppp[3839]: tun0: Phase: deflink: ** Too many LQR packets lost ** and the kernel spews out: /kernel: session in wrong state ...just after ppp prints out: ppp[58]: tun0: Phase: deflink: dial -> carrier ppp[58]: tun0: Phase: Received NGM_PPPOE_ACNAME (hook "62031110019965-") which is usually followed by: ppp[58]: tun0: Phase: Received NGM_PPPOE_SESSIONID ppp[58]: tun0: Phase: Received NGM_PPPOE_SUCCESS ppp[58]: tun0: Phase: deflink: carrier -> login ppp[58]: tun0: Phase: deflink: login -> lcp ppp[58]: tun0: Warning: deflink: Reducing configured MRU from 1500 to 1492 ppp[58]: tun0: Phase: bundle: Authenticate ppp[58]: tun0: Phase: deflink: his = PAP, mine = none ppp[58]: tun0: Phase: Pap Output: ******* ******** ppp[58]: tun0: Phase: Pap Input: SUCCESS () ...instead. I've heard other people having similar problems last year (see google for the "wrong state" message) but it's the first time it actually happens to me. The other person that had this problem had it fixed by switching NIC, so I might try this here too. If I need to power cycle the modem in order to get it back into shape. And I'm pretty sure it's not the modem's fault since I can reliably trigger the error by generating a "down" event in ppp (pppctl /var/run/tun down). I suspect that a recent 4.6->4.8-RC upgrade is responsible for this problem, since it started happening during an installworld (yes, a live installworld). Now I've started hacking the kernel, thinking it might be in ng_pppoe.c that the problem is. I've replaced the error condition with a "warning", hoping everything will resolve normally. I don't know pppoe very much, however, and documentation on the modem (an external Daewoo dw-8050) is not really available. Any pointers on where to begin? I've started with a debug printf-style thing in the guilty section, but I'm not sure it'll do anything: /* * Check the session is in the right state. * It needs to be in PPPOE_SINIT. */ sp = sendhook->private; if (sp->state != PPPOE_SINIT) { printf("session in wrong state: %i\n", sp->state); /* LEAVE(ENETUNREACH);*/ break; } I'm about to test those changes here. It is my intuition that the session is indeed in the good state, and in fact that it is still connected, and all fine, but the kernel thinks otherwise. So... any idea? A. -- Nothing incites to money-crimes like great poverty or great wealth. - Mark Twain
pgp00000.pgp
Description: PGP signature