Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Sep 1999 10:05:16 -0400
From:      Dennis <dennis@etinc.com>
To:        "Daniel Hilevich" <danhil@cwnt.com>, <freebsd-questions@FreeBSD.ORG>, <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: A bug in the sppp driver?
Message-ID:  <199909291507.LAA07913@etinc.com>
In-Reply-To: <033a01bf0a92$8fe1b4e0$2e00a8c0@nt46daniel>

next in thread | previous in thread | raw e-mail | index | archive | help
At 04:51 PM 9/29/99 +0100, Daniel Hilevich wrote:
>While trying to use the sppp, I came across this situation and I think it's
>a bug:
>When you trying to establish connection from one peer (local) to another
>(remote), you sent a CONF_REQ message to the remote peer. The remote peer
>should answer with a CONF_ACK message. In the code of the sppp driver
>(net/if_spppsubr.c,  lines 1321 - 1357) you can see that the remote peer
>send's a CONF_ACK message to the local peer
>(in the line:  rv = (cp->RCR)(sp, h, len);) but doesn't change it state to
>STATE_ACK_SENT (as I think it should do) . Further more, you can see that
>after a few lines, there are these strange lines:
>  case STATE_ACK_SENT:
>  case STATE_REQ_SENT:
>   sppp_cp_change_state(cp, sp, rv?
>          STATE_ACK_SENT: STATE_REQ_SENT);
>   break;
>
>Question: if you are in the STATE_ACK_SENT why change the state to the same
>one according to the value of rv?
>
>As I understand, the state should be changed according to the value of rv,
>but it should be done right after the call to cp->RCR. The it is implemented
>now, the state won't be changed.

the state is dependent on what state you are in, given the event. Have you
verified that you are in ack_sent?

doing state machines with switch statements is a big mess.

Dennis




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?199909291507.LAA07913>