From owner-freebsd-hackers Thu Sep 30 0:43:42 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from alpha.netvision.net.il (alpha.netvision.net.il [194.90.1.13]) by hub.freebsd.org (Postfix) with ESMTP id B7D0A14E8E; Thu, 30 Sep 1999 00:43:35 -0700 (PDT) (envelope-from danhil@cwnt.com) Received: from unspecified.host (RAS4-p71.hfa.netvision.net.il [62.0.146.199]) by alpha.netvision.net.il (8.9.3/8.8.6) with SMTP id JAA06083; Thu, 30 Sep 1999 09:43:30 +0200 (IST) Received: from 192.168.0.46 ([192.168.0.46]) by 192.168.0.1 (WinRoute 3.04g) with SMTP; Thu, 30 Sep 1999 09:41:14 +0200 Message-ID: <047c01bf0b1f$8c8b89f0$2e00a8c0@nt46daniel> From: "Daniel Hilevich" To: "Mark Tinguely" Cc: , References: <199909291710.MAA20873@plains.NoDak.edu> Subject: Re: A bug in the sppp driver? Date: Thu, 30 Sep 1999 09:41:11 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1255" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > 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