Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Sep 1999 11:41:00 +0200 (SAT)
From:      John Hay <jhay@mikom.csir.co.za>
To:        danhil@cwnt.com (Daniel Hilevich)
Cc:        jhay@mikom.csir.co.za (John Hay), freebsd-hackers@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG
Subject:   Re: A bug in the sppp driver?
Message-ID:  <199909300941.LAA77105@zibbi.mikom.csir.co.za>
In-Reply-To: <049401bf0b20$e3621c20$2e00a8c0@nt46daniel> from Daniel Hilevich at "Sep 30, 1999 09:50:47 am"

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




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