From owner-freebsd-isdn Tue Jan 28 0:26: 4 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 5BB8337B6B7; Tue, 28 Jan 2003 00:26:02 -0800 (PST) Received: from guinness.syncrontech.com (guinness.syncrontech.com [62.71.8.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id A84F243E4A; Tue, 28 Jan 2003 00:26:00 -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 h0S8PvEI056891; Tue, 28 Jan 2003 10:25:58 +0200 (EET) (envelope-from ari.suutari@syncrontech.com) Content-Type: text/plain; charset="iso-8859-1" From: Ari Suutari To: Gary Jennejohn , joerg@FreeBSD.ORG Subject: Re: Problem with "no bufferspace" - solution Date: Tue, 28 Jan 2003 10:25:57 +0200 User-Agent: KMail/1.4.3 Cc: "G Hasse" , freebsd-isdn@FreeBSD.ORG References: <200301241522.h0OFLwj1014253@peedub.jennejohn.org> In-Reply-To: <200301241522.h0OFLwj1014253@peedub.jennejohn.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200301281025.57413.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, I think I have now understood this better. The PPP layer can be activated by two events, either by "up" or "open". When PPP is activated by incoming call "up" is used to signal that physical layer has become ready to transmit packets. In this case, "down" can be used to bring the layer down. However, if the PPP is activated by outgoing packet, an "open" event is used inside ppp to put LCP layer into starting state. In this case, "close" should be used to bring the LCP layer down. This is why the sppp complains about illegal state transition when i4b issues "down" after dialing has failed. I cannot think of any kind of simple solution to this, except when dialing fails issue first "up" and then immediately "down". I wonder how pppd and user ppp handle this (ie. modem dialing fails when using on-demand dialing) =09Ari S. On Friday 24 January 2003 17:21, Gary Jennejohn wrote: > > In that case my suggestion is incorrect. Your patch is the correct > way to do it. > > "Ari Suutari" writes: > > I did some reading on PPP RFC (1661). The correct way for > > physical layer to signal that it is no longer able to carry packet > > is to use Down event. So I think that my original code was correct= =2E > > The problem is in sppp layer, which works otherwise ok > > but prints out extraneous message. > > > > The PPP RFC doesn't say that it is legal to receive > > Down event when LCP is in starting state but says > > elsewhere that Down is the event to use by physical layer... > > I suppose. if_spppsubr.c is J=F6rg Wunsch's baby. We should ask him > his opinion. I'm pretty sure that he's subscribed to this list. > But I'll Cc: him. > > J=F6rg, any problem aith adding something like this to sppp_down_event? > (not a real diff) > > case STATE_CLOSING: > + case STATE_STARTING: > =09sppp_cp_change_state(cp, sp, STATE_INITIAL); > =09break; > > --- > Gary Jennejohn / garyj@jennejohn.org gj@freebsd.org gj@denx.de > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-isdn" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message