Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jan 2003 10:05:57 +0200
From:      Ari Suutari <ari.suutari@syncrontech.com>
To:        Gary Jennejohn <garyj@jennejohn.org>
Cc:        "G Hasse" <gh@raditex.se>, freebsd-isdn@FreeBSD.ORG
Subject:   Re: Problem with "no bufferspace" - solution#2
Message-ID:  <200301301005.57188.ari.suutari@syncrontech.com>
In-Reply-To: <200301241141.h0OBfi6e003789@peedub.jennejohn.org>
References:  <200301241141.h0OBfi6e003789@peedub.jennejohn.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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