From: rjd@xyzzy.clara.co.uk
To: paulkf@microgate.com (Paul Fulghum)
Cc: rjd@xyzzy.clara.co.uk, paulus@samba.org, linux-kernel@vger.kernel.org
Subject: SyncPPP IPCP/LCP loop problem and patch. Take 2
Date: Thu, 24 May 2001 16:11:49 +0100 (BST) [thread overview]
Message-ID: <200105241511.f4OFBnC27735@xyzzy.clara.co.uk> (raw)
In-Reply-To: <00bf01c0e2d9$de15b8c0$0c00a8c0@diemos> from "Paul Fulghum" at May 22, 2001 04:27:19
Paul Fulghum wrote:
> >
> > Thanks but I've already tried that. You get a slightly different pattern
> > to the loop but it still loops.
>
> What does the loop look like when the cfg-req is sent 1st?
Thanks for making me go back and look at it again guys. The reordering of
REQ and ACK does work to break the loop. Provided you apply the patch to
both ends of the link.
This is a much smaller patch, remains RFC1661 conformant and works against
all the platforms I've been able to test. Against an unpatched Linux it
still loops but no worse than before.
--- syncppp.c-orig Mon May 21 10:35:59 2001
+++ syncppp.c Thu May 24 15:55:55 2001
@@ -517,8 +517,10 @@
}
/* Send Configure-Ack packet. */
sp->pp_loopcnt = 0;
- sppp_cp_send (sp, PPP_LCP, LCP_CONF_ACK,
- h->ident, len-4, h+1);
+ if (sp->lcp.state != LCP_STATE_OPENED) {
+ sppp_cp_send (sp, PPP_LCP, LCP_CONF_ACK,
+ h->ident, len-4, h+1);
+ }
/* Change the state. */
switch (sp->lcp.state) {
case LCP_STATE_CLOSED:
@@ -534,7 +536,9 @@
sp->ipcp.state = IPCP_STATE_CLOSED;
/* Initiate renegotiation. */
sppp_lcp_open (sp);
- /* An ACK has already been sent. */
+ /* Send ACK after our REQ in attempt to break loop */
+ sppp_cp_send (sp, PPP_LCP, LCP_CONF_ACK,
+ h->ident, len-4, h+1);
sp->lcp.state = LCP_STATE_ACK_SENT;
break;
}
A colleage has suggested that we should apply the same ordering in the NAK
path and for similar code in the stopped state. Since I've not seen loops in
these areas I'm loath to make changes without the ability to test.
--
Bob Dunlop FarSite Communications
rjd@xyzzy.clara.co.uk bob.dunlop@farsite.co.uk
www.xyzzy.clara.co.uk www.farsite.co.uk
next prev parent reply other threads:[~2001-05-24 15:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-22 10:51 SyncPPP IPCP/LCP loop problem and patch rjd
2001-05-22 12:31 ` Paul Mackerras
2001-05-22 13:34 ` rjd
2001-05-22 16:11 ` Paul Fulghum
2001-05-24 15:11 ` rjd [this message]
2001-05-22 18:13 ` Paul Fulghum
2001-05-24 15:30 ` rjd
2001-05-24 16:56 ` Paul Fulghum
2001-05-24 18:13 ` Alan Cox
2001-05-24 20:27 ` SyncPPP Generic PPP merge Paul Fulghum
2001-05-24 22:18 ` Alan Cox
2001-05-24 22:53 ` Jeff Mcadams
2001-05-24 23:27 ` Paul Fulghum
2001-05-25 0:55 ` Paul Mackerras
2001-05-25 16:44 ` Jeff Mcadams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200105241511.f4OFBnC27735@xyzzy.clara.co.uk \
--to=rjd@xyzzy.clara.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=paulkf@microgate.com \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®