Date: Thu, 30 Sep 1999 09:41:11 +0100 From: "Daniel Hilevich" <danhil@cwnt.com> To: "Mark Tinguely" <tinguely@plains.NoDak.edu> Cc: <freebsd-hackers@FreeBSD.ORG>, <freebsd-questions@FreeBSD.ORG> Subject: Re: A bug in the sppp driver? Message-ID: <047c01bf0b1f$8c8b89f0$2e00a8c0@nt46daniel> References: <199909291710.MAA20873@plains.NoDak.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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 you sent the configuration request, you are in state REQ_SENT. > the Receive Config Ack will cause you to state ACK_SENT on line 1327. > The case I was referring to is as follows: When you get the first CONF_REQ message from a remote peer, you are in STATE_INITIAL. The call to the RCR functions ends with the decision that the situation is legal and the return value is 1. The problem seems to be that no one changes the state from STATE_INITIAL to STATE_ACK_SENT. This way you won't reach line 1327. The fix (for my opinion) 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: ... Thanks for the help Daniel 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?047c01bf0b1f$8c8b89f0$2e00a8c0>