Linux PPP protocol development
 help / color / mirror / Atom feed
* pppd 2.4.2b3 IPCP converge failure
@ 2004-03-21  7:59 Andy
  2004-03-21 18:44 ` James Carlson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andy @ 2004-03-21  7:59 UTC (permalink / raw)
  To: linux-ppp

Can anyone suggest what might have caused this to happen:

Mar 20 18:39:55 pppd[24048]: sent [IPCP ConfReq id=0xae <addrs
68.244.143.67 0.0.0.0> <ms-dns1 68.28.178.11> <ms-dns3 68.28.186.11>]
Mar 20 18:39:55 pppd[24048]: rcvd [IPCP ConfRej id=0xae <addrs
68.244.143.67 0.0.0.0>]
Mar 20 18:39:55 pppd[24048]: sent [IPCP ConfReq id=0xaf <addrs
68.244.143.67 0.0.0.0> <ms-dns1 68.28.178.11> <ms-dns3 68.28.186.11>]
Mar 20 18:39:55 pppd[24048]: rcvd [IPCP ConfRej id=0xaf <addrs
68.244.143.67 0.0.0.0>]
Mar 20 18:39:55 pppd[24048]: sent [IPCP ConfReq id=0xb0 <addrs
68.244.143.67 0.0.0.0> <ms-dns1 68.28.178.11> <ms-dns3 68.28.186.11>]
Mar 20 18:39:55 pppd[24048]: rcvd [IPCP ConfRej id=0xb0 <addrs
68.244.143.67 0.0.0.0>]
Mar 20 18:39:55 pppd[24048]: sent [IPCP ConfReq id=0xb1 <addrs
68.244.143.67 0.0.0.0> <ms-dns1 68.28.178.11> <ms-dns3 68.28.186.11>]
Mar 20 18:39:55 pppd[24048]: rcvd [IPCP ConfRej id=0xb1 <addrs
68.244.143.67 0.0.0.0>]
Mar 20 18:39:55 pppd[24048]: sent [IPCP ConfReq id=0xb2 <addrs
68.244.143.67 0.0.0.0> <ms-dns1 68.28.178.11> <ms-dns3 68.28.186.11>]
Mar 20 18:39:56 pppd[24048]: rcvd [IPCP ConfRej id=0xb2 <addrs
68.244.143.67 0.0.0.0>]
Mar 20 18:39:56 pppd[24048]: sent [IPCP ConfReq id=0xb3 <addrs
68.244.143.67 0.0.0.0> <ms-dns1 68.28.178.11> <ms-dns3 68.28.186.11>]
Mar 20 18:39:56 pppd[24048]: rcvd [IPCP ConfRej id=0xb3 <addrs
68.244.143.67 0.0.0.0>]

etc ad infinitum

this appears in the logs of a remote embedded system that connects thru
ppp over a wireless link, it went off the air for about an hour today
and when it came back its logs were full of this stuff. There's about 5
IPCP ConfReq/ConfRej messages each second. Every 3 seconds there are
these additional messages:

Mar 20 18:39:45 pppd[24048]: rcvd [IPCP ConfReq id=0xff <addr
68.28.165.192>]
Mar 20 18:39:45 pppd[24048]: sent [IPCP ConfAck id=0xff <addr
68.28.165.192>]

but although my box acked the new address, it proceeded to ignore it.

Evenually (mercifully!) the peer sent a Term and hung up, my box then
reconnected successfully.

The embedded system has limited space for logs, so I have only the last
5 minutes or so of this event, I can't see what happened to start it
off.

I'm wondering about the ConfReq packets, what is the second address
field doing there (as in addrs 68.244.143.67 0.0.0.0) - that looks wrong
to me. And there certainly seems to be a protocol error here in pppd
handling the ConfRej's - this is from rfc1661, section 5.4:

      Reception of a valid Configure-Reject indicates that when a new
      Configure-Request is sent, it MUST NOT include any of the
      Configuration Options listed in the Configure-Reject.


I don't explicitly set the ipcp-max-configure option, so it should have
defaulted to 10, according to the manpage, which also states that the
ipcp-max-failure option applies to ConfNak's, so presumably the
ConfRej's weren't being counted.

This system is running 2.4.2b3, I see that ipcp.c has been updated in
2.4.2, I wonder if this is a known bug. Apologies if it is, but I
couldn't find a changelog or anything that describes what's been fixed.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: pppd 2.4.2b3 IPCP converge failure
  2004-03-21  7:59 pppd 2.4.2b3 IPCP converge failure Andy
@ 2004-03-21 18:44 ` James Carlson
  2004-03-21 19:21 ` Andy
  2004-03-22  5:34 ` Paul Mackerras
  2 siblings, 0 replies; 4+ messages in thread
From: James Carlson @ 2004-03-21 18:44 UTC (permalink / raw)
  To: linux-ppp

Andy writes:
> Can anyone suggest what might have caused this to happen:
> 
> Mar 20 18:39:55 pppd[24048]: sent [IPCP ConfReq id=0xae <addrs
> 68.244.143.67 0.0.0.0> <ms-dns1 68.28.178.11> <ms-dns3 68.28.186.11>]
> Mar 20 18:39:55 pppd[24048]: rcvd [IPCP ConfRej id=0xae <addrs
> 68.244.143.67 0.0.0.0>]

You've cut off the important part of this log -- the one where the
peers had initial trouble negotiating IPCP.  You'll need to get that
part of the log and examine it.

> I'm wondering about the ConfReq packets, what is the second address
> field doing there (as in addrs 68.244.143.67 0.0.0.0)

This is the old, obsolete IP-Addresses option (see RFC 1332, section
3.1).  The only time it's used is when the modern IP-Address option
fails.  And, yes, pppd is rather insistent on trying to use it when
all else fails.

It's just a symptom of some other problem, not a cause, and not
necessarily a problem in itself.

At a guess, something went terribly wrong in the initial IPCP
negotiation.  Does that remote peer properly implement the state
machine from RFC 1661?

-- 
James Carlson                                  <carlson@workingcode.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: pppd 2.4.2b3 IPCP converge failure
  2004-03-21  7:59 pppd 2.4.2b3 IPCP converge failure Andy
  2004-03-21 18:44 ` James Carlson
@ 2004-03-21 19:21 ` Andy
  2004-03-22  5:34 ` Paul Mackerras
  2 siblings, 0 replies; 4+ messages in thread
From: Andy @ 2004-03-21 19:21 UTC (permalink / raw)
  To: linux-ppp

On Sun, 2004-03-21 at 13:44, James Carlson wrote:

> You've cut off the important part of this log -- the one where the
> peers had initial trouble negotiating IPCP.  You'll need to get that
> part of the log and examine it.
I know. As I mentioned, I only have about 5 minutes of logs, the earlier
stuff got overwritten. There's just not enough space on the device to
store more. This whole event lasted for about an hour.
If it happens again, I may be able to find a way to save more. 

> 
> > I'm wondering about the ConfReq packets, what is the second address
> > field doing there (as in addrs 68.244.143.67 0.0.0.0)
> 
> This is the old, obsolete IP-Addresses option (see RFC 1332, section
> 3.1).  The only time it's used is when the modern IP-Address option
> fails.  And, yes, pppd is rather insistent on trying to use it when
> all else fails.
> 
> It's just a symptom of some other problem, not a cause, and not
> necessarily a problem in itself.
> 
> At a guess, something went terribly wrong in the initial IPCP
> negotiation.  Does that remote peer properly implement the state
> machine from RFC 1661?

No idea - it's an ISP, I don't know what they're using.
However, whether they implement it correctly or not, it seems that pppd
does not - it's pretty clear from rfc1661 that just repeating the same
configure-request over and over, despite getting a configure-reject, is
a protocol violation.

Although it would be useful to know how we got into this state, it's
probably more important to fix the code so this endless loop won't
happen. I'm not familiar enough with the IPCP FSM as implemented in pppd
to be able to do that quickly, I was hoping someone may have done this
work already. If not, I'll try to get into the code myself.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: pppd 2.4.2b3 IPCP converge failure
  2004-03-21  7:59 pppd 2.4.2b3 IPCP converge failure Andy
  2004-03-21 18:44 ` James Carlson
  2004-03-21 19:21 ` Andy
@ 2004-03-22  5:34 ` Paul Mackerras
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Mackerras @ 2004-03-22  5:34 UTC (permalink / raw)
  To: linux-ppp

Andy writes:

> I'm wondering about the ConfReq packets, what is the second address
> field doing there (as in addrs 68.244.143.67 0.0.0.0) - that looks wrong
> to me. And there certainly seems to be a protocol error here in pppd
> handling the ConfRej's - this is from rfc1661, section 5.4:
> 
>       Reception of a valid Configure-Reject indicates that when a new
>       Configure-Request is sent, it MUST NOT include any of the
>       Configuration Options listed in the Configure-Reject.

It looks like the bug is here (line 723 of ipcp.c, in ipcp_cilen):

    if ((wo->neg_addr || wo->old_addrs) && !go->neg_addr && !go->old_addrs) {
        /* use the old style of address negotiation */
        go->old_addrs = 1;
    }

Receiving the conf-reject for the old CI_ADDRS option sets
go->old_addrs to 0.  Then when we send the next conf-request, this
code sets it to 1 again.

I'll have to think about the proper fix here.

Paul.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-03-22  5:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-21  7:59 pppd 2.4.2b3 IPCP converge failure Andy
2004-03-21 18:44 ` James Carlson
2004-03-21 19:21 ` Andy
2004-03-22  5:34 ` Paul Mackerras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox