Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Mar 2003 11:09:23 -0500
From:      The Anarcat <anarcat@anarcat.ath.cx>
To:        hackers@freebsd.org
Subject:   pointers on how to debug a pppoe quirk
Message-ID:  <20030312160923.GA77384@lenny.anarcat.ath.cx>

next in thread | raw e-mail | index | archive | help

--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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

=2E..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 =3D PAP, mine =3D none
ppp[58]: tun0: Phase: Pap Output: ******* ********
ppp[58]: tun0: Phase: Pap Input: SUCCESS ()

=2E..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 =3D sendhook->private;
                                if (sp->state !=3D 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.



--=20
Nothing incites to money-crimes like great poverty or great wealth.
                        - Mark Twain

--sm4nu43k4a2Rpi4c
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+b1uzttcWHAnWiGcRAiOzAJwMBk/a5Gu5mklGfUioxen/nlfPbACfdUoz
YkQyMdjmFz8ub8G+Y31E3Bg=
=TDua
-----END PGP SIGNATURE-----

--sm4nu43k4a2Rpi4c--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030312160923.GA77384>