From owner-freebsd-hackers Thu Sep 30 2:41:22 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from zibbi.mikom.csir.co.za (zibbi.mikom.csir.co.za [146.64.24.58]) by hub.freebsd.org (Postfix) with ESMTP id 5DBD21525F; Thu, 30 Sep 1999 02:41:09 -0700 (PDT) (envelope-from jhay@zibbi.mikom.csir.co.za) Received: (from jhay@localhost) by zibbi.mikom.csir.co.za (8.9.3/8.9.3) id LAA77105; Thu, 30 Sep 1999 11:41:00 +0200 (SAT) (envelope-from jhay) From: John Hay Message-Id: <199909300941.LAA77105@zibbi.mikom.csir.co.za> Subject: Re: A bug in the sppp driver? In-Reply-To: <049401bf0b20$e3621c20$2e00a8c0@nt46daniel> from Daniel Hilevich at "Sep 30, 1999 09:50:47 am" To: danhil@cwnt.com (Daniel Hilevich) Date: Thu, 30 Sep 1999 11:41:00 +0200 (SAT) Cc: jhay@mikom.csir.co.za (John Hay), freebsd-hackers@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > My problem is that when you get the first CONF_REQ message, the driver's > state is INITIAL. > The call to the RCR function return with the value 1 but, no one changes the > state to STATE_ACK_SENT. I think the fix should be like this (line 1274): > > .... > rv = (cp->RCR)(sp, h, len); > > /* Daniel - fix */ > if (rv && sp->state[cp->protoidx] == STATE_INITIAL) > sppp_cp_change_state(cp, sp, STATE_ACK_SENT); > > sp->rst_counter[cp->protoidx] = sp->lcp.max_configure; > /* End of fix */ > > switch (sp->state[cp->protoidx]) { > case STATE_OPENED: > ... I think you are trying to bypass things. Look at rfc1661 on page 6 and 12-13. If you are in state initial, you are not supposed to react to anything except Up, Open and Close events. Have a look at the other drivers like ar(4), cx(4) and sr(4) to see how they use it. Also remember that they need an ifconfig to get started. That help them trough a lot of the states. Ifconfig will have the effect of giving an Up and then an Open event, which will take sppp from the Initial(0) state to Closed(2) and then to Req-Sent(6). John -- John Hay -- John.Hay@mikom.csir.co.za To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message