From owner-freebsd-isdn Thu Jan 30 0: 6: 8 2003 Delivered-To: freebsd-isdn@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3F62C37B401 for ; Thu, 30 Jan 2003 00:06:06 -0800 (PST) Received: from guinness.syncrontech.com (guinness.syncrontech.com [62.71.8.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B04243E4A for ; Thu, 30 Jan 2003 00:06:04 -0800 (PST) (envelope-from ari.suutari@syncrontech.com) Received: from coffee.syncrontech.com (coffee.syncrontech.com [62.71.8.37]) by guinness.syncrontech.com (8.12.6/8.12.6) with ESMTP id h0U85vEI047078; Thu, 30 Jan 2003 10:05:57 +0200 (EET) (envelope-from ari.suutari@syncrontech.com) Content-Type: text/plain; charset="iso-8859-1" From: Ari Suutari To: Gary Jennejohn Subject: Re: Problem with "no bufferspace" - solution#2 Date: Thu, 30 Jan 2003 10:05:57 +0200 User-Agent: KMail/1.4.3 Cc: "G Hasse" , freebsd-isdn@FreeBSD.ORG References: <200301241141.h0OBfi6e003789@peedub.jennejohn.org> In-Reply-To: <200301241141.h0OBfi6e003789@peedub.jennejohn.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200301301005.57188.ari.suutari@syncrontech.com> X-Scanned-By: MIMEDefang 2.24 (www . roaringpenguin . com / mimedefang) Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, Here is a patch for i4b_isppp.c which works (at least for me) without any complications. Maybe someone else could try it also ? The solution was actually simple. I finally figured out why the PPP spec didn't allow Down event that I sent in my first patch. It was because it things that layer must go Up before it can go Down ! Now, when i4b_isppp.c receives notification about=20 dial failure, it first tells sppp that it is up and=20 immediately after that tells that it is down. Calling up doesn't hurt because not packets will be sent as the i4b_isppp.c is not in ST_CONNECTED state. I think that this is a good and simple solution and it doesn't require any changes into if_spppsubr.c. Any chance getting this committed into sources ? =09Ari S. -- here is the patch --- *** i4b_isppp.c.orig=09Thu Jan 30 09:43:55 2003 --- i4b_isppp.c=09Thu Jan 30 09:50:40 2003 *************** *** 614,619 **** --- 614,620 ---- i4bisppp_dialresponse(int unit, int status, cause_t cause) { =09struct i4bisppp_softc *sc =3D &i4bisppp_softc[unit]; + =09struct sppp *sp =3D &sc->sc_if_un.scu_sp; =20 =09NDBGL4(L4_ISPDBG, "isp%d: status=3D%d, cause=3D%d", unit, status, ca= use); =20 *************** *** 628,633 **** --- 629,647 ---- =09=09=09while((m =3D sppp_dequeue(&sc->sc_if)) !=3D NULL) =09=09=09=09m_freem(m); =09=09} +=20 + =09=09sc->sc_cdp =3D (call_desc_t *)0;=09 + =09=09/* do thhis here because pp_down calls i4bisppp_tlf */ + =09=09sc->sc_state =3D ST_IDLE; +=20 + =09=09/* Ahh. ppp does't like to get a down event when + =09=09 * dialing fails. So first tell that we are up + =09=09 * (doesn't hurt us since sc_state !=3D ST_CONNECTED) + =09=09 * and then go down. + =09=09 */ +=20 + =09=09sp->pp_up(sp); + =09=09sp->pp_down(sp); =09} } =09 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message